how to determine if python is run interactively? (-i)

Duncan Booth duncan.booth at invalid.invalid
Tue Jul 14 12:26:28 EDT 2009


jfrancis4970 at mailinator.com wrote:

> how do you determine, from within a python program, whether the python
> interpreter was launched in interactive mode?

sys.flags.interactive or sys.flags.inspect




More information about the Python-list mailing list