[Python-ideas] Why does sys.flags have both .interactive and .inspect?
Alexander Walters
tritium-list at sdamon.com
Mon Aug 24 09:07:49 CEST 2015
On 8/23/2015 18:36, MRAB wrote:
> I tested it, and they _can_ be different.
>
> sys.flags.interactive will be true if you include the -i switch.
>
> sys.flags.inspect will be true if you include the -i switch or set the
> PYTHONINSPECT environment
> variable.
>
> Thus, if you don't include the -i switch but _do_ set PYTHONINSPECT,
> sys.flags.interactive will be
> false and sys.flags.inspect will be true.
That seams significant enough to be documented. I'll work on a patch in
the morning.
More information about the Python-ideas
mailing list