Forcing interactive interpreter without (-i)

Thomas Heller theller at python.net
Tue Feb 1 04:03:14 EST 2005


Miki Tebeka <miki.tebeka at zoran.com> writes:

> Hello All,
>
> If there a way a script can tell Python to enter interactive mode even if
> the -i command line switch was not given?
>
> I want py2exe to create an interactive session, without writing my own
> REPL.

IIRC, in newer Python versions, you can set the PYTHONINSPECT env var inside
your script.

Thomas



More information about the Python-list mailing list