On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:

C:\Users\Piotr>assoc .py
.py=Python.File
C:\Users\Piotr>ftype Python.File
Python.File=c:\python\2.7\python.exe "%1" %*

Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file.

link|improve this question

50% accept rate
feedback

migrated from stackoverflow.com Aug 26 '11 at 0:46

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

2 Answers

Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.

link|improve this answer
I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question. – Piotr Dobrogost Aug 26 '11 at 6:35
feedback

no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.

Also, make sure your PATH (system/user environment variable) includes the path to your python executable.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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