How do I change the default editor for a python file?


When I right-click on a .py file, I am given the option to "Edit with IDLE". How can I replace IDLE with another IDE, such as PyCharm? ie when I right-click on any .py file, I would like there to be the option to "Edit with PyCharm".

I am using Windows by the way.

The "Edit with IDLE" option is actually placed there by IDLE itself. The thing you could do is just change the default program you want python files to be opened with (by right clicking, choosing "Open with" and choose a default program).

The additional entries in the context menus are specified in the registry. So i think if you want to manually add a "Edit with PyCharm" option you would have to edit the registry yourself. But I wouldn't recommend to do that at all.