Setting .py file to notepad as default mistakenly

1.1k Views Asked by At

I mistakenly set .py file to notepad as default mistakenly and it opens .py as txt file, but I don't want to open .py files with any program. I searched stackoverflow but solutions did not work for me. How can I solve it?

2

There are 2 best solutions below

1
On

Probably, this one: How do you remove a default program association for file types in Windows 7?

https://superuser.com/questions/49615/how-do-you-remove-a-default-program-association-for-file-types-in-windows-7

4
On

Not a python-related question.

  • Open Command Prompt in Administrator Mode.
  • Type assoc .py at the prompt. (If the association is set with notepad, the same will be shown.)
  • To not associate .py with any program (careful!) type assoc .py=. This sets the association to a non-existent value - simply, deletes it.