Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Activating `-i' from inside a script?

Reply
Thread Tools

Re: Activating `-i' from inside a script?

 
 
Bob Gailer
Guest
Posts: n/a
 
      06-27-2003
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.

Bob Gailer

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activating both A + G Wireless Channels =?Utf-8?B?YnJlbnRyb21lcm8=?= Wireless Networking 2 11-02-2005 01:34 AM
2732 Activating expired training material on retail version of VPC =?Utf-8?B?c3BpbmZpeGxpeg==?= Microsoft Certification 1 09-01-2005 02:56 PM
activating encryptiong causes device to be hidden from workgroup Keyser Wireless Networking 1 05-10-2005 02:36 PM
Activating `-i' from inside a script? =?iso-8859-1?q?Fran=E7ois_Pinard?= Python 2 07-01-2003 01:46 AM
Re: Activating `-i' from inside a script? Fredrik Lundh Python 3 06-27-2003 11:49 AM



Advertisments