Setting interactive flag inside a script?

Lee, Rick rickylee at
Wed Mar 7 18:55:17 CET 2001

Is there a way to set the python interactive flag, ie. the '-i' flag in
the command line, inside a script itself?  (Motivation: Sometimes you
give someone else a .py script, s/he doubleclicks on it, something may
have gone wrong, and the command line window just disappears. If the
script can turn the interactive flag on, then the window won't just
disappear by default.  When the script finishes properly, it can turn
the flag off just at the very end.)

- Rick Lee

More information about the Python-list mailing list