starting repl programmatically

Brendan Miller catphive at catphive.net
Thu May 20 20:11:17 EDT 2010


python -i myscript.py

almost does what I want. The only problem is if I exit with exit(0) it
does *not* enter interactive mode. I have to run off the end of the
script as near as I can tell. Is there another way to exit without
breaking python -i?

On Thu, May 20, 2010 at 4:57 PM, Brendan Miller <catphive at catphive.net> wrote:
> I have a python script that sets up some environmental stuff. I would
> then like to be able to change back to interactive mode and use that
> environment. What's the best way to do that?
>



More information about the Python-list mailing list