problem with pythonwin32

John Roth johnroth at ameritech.net
Sun Aug 26 23:05:23 EDT 2001


"Paul Greer" <Paul.Greer1 at btinternet.com> wrote in message
news:9mc3m3$jk3$1 at plutonium.btinternet.com...
> Might sound like a silly question but how do I get a script to run as a
> program from an Icon on windows. When ever I do the DOS box opens and
> immediately closes.

It actually ran, as long as your Python path and so forth were set up
properly
to begin with.

The problem is if you were expecting the DOS box to stay open
so you could supply input or parameters. As far as I know, there's no simple
way to do this. One way is to set up a DOS command, with Properties |
Program
| Command Line set to C:\windows\command.com and Batch File on the same
properties page set to the name of a batch file that actually invokes your
program.
The batch file can also do other things, like setting up the working
directory and
the correct path to Python, and so forth. They you simply double click the
DOS
icon, and it works.

Of course, if you simply want the ugly DOS box to quit flashing at you,
rename
the script to .pyw, as the other responders have mentioned. I presumed that
wasn't
your problem, since you mentioned wanting it to actually run...

John Roth







More information about the Python-list mailing list