Running Python programmes

darnold darnold992000 at yahoo.com
Tue Oct 29 12:59:37 EDT 2013


Maybe you're inadvertently running Python with either the '-i' switch or with the PYTHONINSPECT environment variable set? 
When you do that, your script will launch an interactive prompt after it completes.
 

C:\Python27>echo print "hello" > hello.py

C:\Python27>python hello.py
hello

C:\Python27>python -i hello.py
hello
>>>
>>> ^Z


C:\Python27>set PYTHONINSPECT=1

C:\Python27>python hello.py
hello
>>>
>>> ^Z




More information about the Python-list mailing list