autoexecution in Windows

Bill wpeterson1 at socal.rr.com
Mon Mar 7 16:40:27 EST 2005


Earl Eiland wrote:
> How does one make a Python program auto-execute in Windows?
>
> Earl

You need to have files with .py or .pyo or .py registered to open with
the python interpreter. In Windows Explorer, choose the menu item
Tools->Folder Options and select the File Types tab to see how
registered file types are set up.

On my system, for the extension .py, the "open" action has an
application string of C:\Python23\python.exe "%1" %*. For .pyw files
it's C:\Python23\pythonw.exe "%1" %*.

I can double click on a .py file and it executes, or use the command
prompt.

I believe if you install the Activestate distribution it sets up the
file registrations automatically.

Bill




More information about the Python-list mailing list