Re: Activating `-i' from inside a script?
At 08:24 PM 6/26/2003 -0400, François Pinard wrote:
>Hi, Python friends.
>Is there a way for a script to activate the effect of the `-i' option, that
>is, to force interactive mode once `__main__' has run? For one application,
>I would like that if the application discovers some data discrepancy or
>failure (not a Python error) and only then, and if the application was also
>started from a tty, it gives the user to interactively explore, using
>Python, the context that was built while the run was going.
You can use sys.exit() within __main__ to terminate the interpreter if
there is no problem, and use -i to run the module.
303 442 2625
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.492 / Virus Database: 291 - Release Date: 6/24/2003
|All times are GMT. The time now is 05:45 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.