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

Discussion in 'Python' started by Bob Gailer, Jun 27, 2003.

  1. Bob Gailer

    Bob Gailer Guest

    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
     
    Bob Gailer, Jun 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Strauss

    Activating JavaScript from C#

    Mike Strauss, Dec 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,949
    Elton Wang
    Dec 20, 2004
  2. Robert Rotstein

    activating a SOAP extension from the client

    Robert Rotstein, Jan 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    440
    Robert Rotstein
    Jan 10, 2006
  3. Robert Rotstein

    activating a SOAP extension from a client

    Robert Rotstein, Jan 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    329
    Robert Rotstein
    Jan 10, 2006
  4. =?iso-8859-1?q?Fran=E7ois_Pinard?=

    Activating `-i' from inside a script?

    =?iso-8859-1?q?Fran=E7ois_Pinard?=, Jun 27, 2003, in forum: Python
    Replies:
    2
    Views:
    639
    Fernando Perez
    Jul 1, 2003
  5. Fredrik Lundh

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

    Fredrik Lundh, Jun 27, 2003, in forum: Python
    Replies:
    3
    Views:
    645
    =?iso-8859-1?q?Fran=E7ois_Pinard?=
    Jun 27, 2003
Loading...

Share This Page