Windows Cmd.exe Window

Giles Brown giles_brown at hotmail.com
Thu Jul 7 10:01:49 EDT 2005


Thanks for your replies.

I think we might have a miscommunication here as (to my understanding)
neither of your replies actually solve my problem.

After all, the function raw_input is just another way of blocking until
user input.  I was already doing that using "os.system('pause')".

To recap, what I'm looking for is a way of setting up specific scripts
(not every script) so that when I double click on it, it runs, but if
there is an exception (even a SyntaxError in the top level script) I
get a traceback in a window that doesn't disappear immediately.

The tricky elements of this are:
1) It can't be done using code in the script itself (such as using an
import statement) because in the presence of a SyntaxError the import
statement is never run.  This is why I was looking at sitecustomize.py
2) I don't want to do unusual exception/atexit hooking for every script
and so need to be able to detect when I am running one of these .cmd
type scripts.

I hope this clarifies things.  I had hoped that my question was worded
sufficiently well to indicate this wasn't a straight-down-the-line
newbie question (I've been programming in Python for seven years now).
Obviously it wasn't.  My apologies.

Giles




More information about the Python-list mailing list