Windows Cmd.exe Window
brian at mirror.org
brian at mirror.org
Thu Jul 7 18:47:54 EDT 2005
> In the past I have created .bat wrapper files that just call the python
> interpreter, but it is a bit tedious to have to create a matching .bat
> file for every script. So I came up with the following approach...
>
I frequently use a batch file wrapper. Typically it has a long
friendly name for others in my (non-IT) department, and calls the
actual python script in a subfolder, often with arguments. The last
line of the batch file is usually a pause command.
As an alternative, I have a couple of main procedures wrap a try/except
around the entire script, and if an error occurs, then logs the details
before quitting. I suppose you could also print the error, and add a
call raw_input() so its visible before the window closes.
Hope that helps,
Brian.
More information about the Python-list
mailing list