Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

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
share|improve this answer
add comment

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

share|improve this answer
    
Considering that he tagged his post [windows-xp] I'd say it's quite safe to assume that he's not using Windows 7. –  Ansgar Wiechers Sep 16 '12 at 12:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.