Can I check if I'm running from the interpreter prompt?

skip at pobox.com skip at pobox.com
Fri Nov 14 11:13:14 EST 2008


Is there a reliable way (this is on Solaris if that matters) to tell if I'm
running in the interactive interpreter as opposed to in a script?  I think
examining sys.argv works, but wanted to double check.

Thx,

Skip



More information about the Python-list mailing list