Reputation: 745
I am using Python 3.6 and the "Edit with IDLE" option is missing. I have read numerous threads here on Stack Overflow and other websites about editing the registry, but nothing works. I have re-installed completely Python 3.6, also tried with Python 2.7 but I just don't get the option anymore. Any ideas?
Upvotes: 3
Views: 4673
Reputation: 1
I had this problem before. Obviously reinstalling the system will work, but I am kidding, you don't have to do that. I will suggest one way which will work for sure as follows: 1. open regedit 2. under edit: search for "python" 3. delete any term you find and search for next until all terms related to "python" is deleted. 4. Reinstall python, any version you want, Done!!!
Upvotes: 0
Reputation: 338188
Not strictly a programming question, but here are the registry keys that are responsible for the context menu entries on Python files in the Windows Explorer.
I've made an "Edit with IDLE" sub-menu as there are multiple versions of Python installed on my machine.
(Disclaimer: This is hand-crafted and will not be removed automatically when you uninstall Python. You have to clean it up yourself.)
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle] "MUIVerb"="&Edit with IDLE" "Subcommands"="" [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell] ; Python 2.7 ----------------------------------------------------------------------- [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit27-32] "MUIVerb"="Edit with IDLE 2.7 (32-bit)" [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit27-32\command] @="\"C:\\Python27\\pythonw.exe\" \"C:\\Python27\\Lib\\idlelib\\idle.pyw\" -e \"%1\"" ; Python 3.6 ----------------------------------------------------------------------- [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit36-32] "MUIVerb"="Edit with IDLE 3.6 (32-bit)" [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\shell\edit36-32\command] @="\"C:\\Python36\\pythonw.exe\" -m idlelib \"%L\" %*"
Of course change the paths according to your installation directories. Add/remove sections according to the installed Python versions. Then save as .reg file and import.
Also note that I've picked sensible subkey names like edit36-32
. It's not strictly required, these only need to be unique, but if I'm creating registry entries, I like them to contain what they say. So, adapt those accordingly.
If you have only one Python version installed and never plan on getting a second installation, or if you like the menu entries in the top level instead of in a sub-menu:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle] @="Edit with IDLE 3.6 (32-bit)" [HKEY_CLASSES_ROOT\Python.File\shell\editwithidle\command] @="\"C:\\Python36\\pythonw.exe\" -m idlelib \"%L\" %*"
Upvotes: 6