Running a Python program thru a Windows shortcut

Kevin Altis altis at semi-retired.com
Sun May 11 23:18:29 EDT 2003


This is the right answer, stated succinctly. The only thing I would add is
that if you don't want a console window to appear, either use pythonw.exe
instead of python.exe or rename your script to dfc.pyw instead of dfc.py.
Just ignore Mr. Roth's post, there is no need to use a batch file.

ka

"TheDustbustr" <thedustbustr at aol.com> wrote in message
news:20030511190020.03191.00000229 at mb-m07.aol.com...
right click> new> shortcut
command line:
C:\python22\python.exe c:\path\to\dfc.py dfcCfgBackup

remember, in python, sys.argv is a tuple containing args passed in.

Depending on your windows version, you MAY have to put python in
double-quotes,
like so:
"C:\python22\python.exe" c:\path\to\dfc.py dfcCfgBackup






More information about the Python-list mailing list