Running a Python program thru a Windows shortcut

David Broadwell anti-spam.dbroadwell at mindspring.com
Mon May 12 00:03:06 EDT 2003


"Kevin Altis" <altis at semi-retired.com> wrote in message
news:bkEva.156$x%2.151955 at news.uswest.net...
> 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.
I'll rember that, especially if my app is in 'script' mode and not prompting
the user.

> Just ignore Mr. Roth's post, there is no need to use a batch file.
Unless you want to use batch files AS a test suite or to call with specific
args.
Or a batch to always run in debug mode ...

I.E.:
--- begin mytest.bat
@echo off
echo prompting test for script.py > mytest.txt
script.py -debug mode=!CLI >> mytest.txt
--- end

There are many handy uses.
Despite the old basic ... it's funtional.
Much the same for C scripts on *nix.


Why ignore it?
--

David Broadwell






More information about the Python-list mailing list