My IDLE shortcut in the right click menu has disappeared. I think it's because I used to use Python 2.7, but I installed Python 2.5 without uninstalling Python2.7, and then uninstalled Python 2.5. I found one file named idle.bat, and it works, but that isn't a good way to solve this problem.

This question came from our site for professional and enthusiast programmers.

I though this is because I installed two Python in my computer, then I remove one. Maybe I should try keyword like "How to insert shortcut into right-click menu". Anyway thanks for your help.
–
JimmyOct 6 '11 at 3:35

That probably is the reason it went missing, but your question is how to fix it
–
Michael MrozekOct 6 '11 at 4:23

3 Answers
3

Here's a reg file to add the command to edit with IDLE for Python.File (.py) and Python.NoConFile (.pyw) file types. It's for Python 2.7, installed in C:\Python27, so substitute the paths to pythonw.exe and idle.pyw that are relevant to your installation. Save it to a .reg file. Then right-click and choose Merge.

Hi, I used another way to add the right-click command, but it apply to all my files. Actually, I just want to apply to *.py file. How can I delete the right-click command I added before ? Then I can add your command. Thank you.
–
JimmyOct 6 '11 at 11:19

@Jimmy: You can use regedit to inspect HKCR\*\shell, HKCR\*\shellex, HKCR\AllFilesystemObjects\shellex, and so on. This is tedious if you don't find the culprit quickly. Or try a a context menu editor such as ShellMenuView and ShellExView.
–
eryksunOct 6 '11 at 12:03

Hi, I find the command in the redgit and delete, but I still can't add the right-click command by these two command. I don't know why. I just want to add the command on the right-click menu of *.py and *.pyw file. Thanks again.
–
JimmyOct 7 '11 at 8:27

@Jimmy: When you save the above to say idle.reg and right-click the file idle.reg, do you see the option 'Merge'? If that seems to work fine and you confirm that the settings were added, then open a command prompt and check that the output of assoc .py is .py=Python.File.
–
eryksunOct 7 '11 at 10:52

Hi,actually I didn't see the idle.pyw. I see the idle.bat, so I replace idle.bat with idle.pyw.
–
JimmyOct 11 '11 at 9:57