Ok, so I just installed Python 2.7, but I all ready had python 2.5. I realized that because I installed Python 2.7 last, IDLE automatically opens Python 2.7 IDLE, which I don't want. Is there any way to set the Python 2.5 IDLE to automatically open when I use the right click option on a python source file? Thanks.
Asked
Active
Viewed 2,068 times
2
-
Windows? Linux? Mac? If on Windows, right-click -> Property and change the file association to the older IDLE, that should do it. – Borgleader Sep 16 '12 at 00:27
-
No because the Open With IDLE is a custom option in the right click menu. I can change what it opens with, but now what that option does. – Tom Sep 16 '12 at 00:33
2 Answers
9
You can easily create or edit the right-click properties for a file.
To edit the right-click menu for a particular file extension:
Run
assoc .py
from the command line and note the name of the association:C:>assoc .py
.py=Python.FileRun
regedit.exe
.- Browse to
HKEY_CLASSES_ROOT\Python.File\shell
. - Create a key under
shell
calledEdit with IDLE
(or however you want it to show up in the menu). - Create a key under
Edit with Idle
calledcommand
. Edit the default value to run the command you want. Use
"%1"
to insert the name of the right-clicked file. Something like:c:\python25\pythonw.exe c:\python25\lib\idlelib\idle.pyw "%1"
Alternatively, just save the following as idle.reg
and double-click it to insert this value in the registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command]
@="\"C:\\Python25\\pythonw.exe\" \"C:\\python25\\Lib\\idlelib\\idle.pyw\" \"%1\""

Mark Tolonen
- 166,664
- 26
- 169
- 251
-1
Unless you need Python 2.7 for some reason, the simplest way to achieve this in Windows is to uninstall Python and reinstall Python 2.5 again.

Eliot Ball
- 698
- 5
- 11