How to make python scripts .py executable, not bring up editor
mccredie at gmail.com
Tue Jul 8 20:23:42 CEST 2008
On Jul 7, 2:56 pm, korean_dave <davidrey... at gmail.com> wrote:
> From command Prompt, i type in a script, "tryme.py".
> This, instead, brings up PythonWin editor and Interactive Window.
> Path variable is "C:\Python24". (I need Python 2.4 installed, not 2.5)
> How do I make it so that the script runs?
You can do this by editing the registry, but here is the general way
to click through chaning file associations:
Right click on any python file (*.py) and choose "Open With" from the
context menu and select "Choose Program..." . From there select
"Python" if it appears, or click "Browse" and browse to "C:
\Python25\python.exe", or the appropriate location if you have it
installed somewhere else.
Make sure to check the box next to "Always use the selected program to
open this kind of file."
More information about the Python-list