2

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.

0

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

2
  • 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
  • 1
    This breaks drag and drop, and argument passing – Eric Jul 5 '16 at 2:05
0

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.

-1

Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files. Hope it helped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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