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

Duncan Booth duncan.booth at invalid.invalid
Tue Jul 14 18:26:28 CEST 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