mimic -i from script

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Mar 2 19:34:08 CET 2004


Is it possible at the end of a script to issue some python command
that will cause the python shell to open as if the -i flag had been
used


Eg, 

  > python -i somefile.py 

and 

  > python somefile.py 

will both behave the same if somefile.py ends with the right magic
incantation?

Thanks,
John Hunter




More information about the Python-list mailing list