Thanks Michael, that's what I was looking for.

Are there any differences between that and the actual interactve prompt that 
I should be aware of?

Would you consider that a better method than using (thanks to those who 
suggested this other option):

import os
os.environ['PYTHONINSPECT'] = '1'


"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Joe wrote:
>
>> I want the script to decide whether to fall back to the interactive 
>> prompt. You solution makes it ALWAYS fall back to the interactive prompt.
>
> Actually, using sys.exit() means the program can exit even if python -i
> is used.
>
> You can use:
>
> import code
> code.interact()
>
> which emulates the interactive prompt.
> -- 
> Michael Hoffman 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to