Starting a script interactively?

Al Kabaila a_kabaila at yahoo.com.au
Sat Jan 3 10:19:05 CET 2004


David Klaffenbach wrote:

> Is there a way from within a python script to cause the interpreter to
> be in interactive mode after the script finishes?
> 
> so that if I run:
> 
> myscript.py
> 
> it will always execute as if I had run:
> 
> python23.exe -i myscript.py
> 

In Linux OS, add first line in myscript.py as follows:

#! /<path to the directory where python lives>/python

and make sure that myscript.py is executable.  I don't know if this works
under dos, but there should be some equivalent.

Regards,
-- 
Al Kabaila, a_kabaila at yahoo.com.au



More information about the Python-list mailing list