1

Ok, so when you right click a file, you get the right click menu. I wasn't sure wether to put this in here or Stack Overflow. I installed Python 2.5 and Python 2.7, and they both have IDLEs. But because I installed Python 2.7 second, it's IDLE opens whenever I right click a python file, but I want python 2.5's IDLE to open when I right click a file and select the Open With IDLE option. Is there any way to make it so Python 2.5's IDLE will open the file instead of Python 2.7's?

2 Answers 2

0

Assuming you're using Windows 7 you want to visit "Control Panel\All Control Panel Items\Default Programs\Set Associations".

1
  • Considering that he tagged his post [windows-xp] I'd say it's quite safe to assume that he's not using Windows 7. Sep 16, 2012 at 12:26
0

On installation, Python registered the file types with the new installation. If you run ftype it'll produce something like this:

C:\>ftype | find /i "python"
Python.CompiledFile="C:\Python27\python.exe" "%1" %*
Python.File="C:\Python27\python.exe" "%1" %*
Python.NoConFile="C:\Python27\pythonw.exe" "%1" %*

What you can do now, is register additional types for Python 2.5, like this:

ftype Python.CompiledFile.25="C:\Python25\python.exe" "%1" %*
ftype Python.File.25="C:\Python25\python.exe" "%1" %*
ftype Python.NoConFile.25="C:\Python25\pythonw.exe" "%1" %*

and then associate the Python file extensions with the new types:

assoc .py=Python.File.25
assoc .pyc=Python.CompiledFile.25
assoc .pyo=Python.CompiledFile.25
assoc .pyw=Python.NoConFile.25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .