Author eric.araujo
Recipients belopolsky, cben, eric.araujo, lesmana, loewis, ned.deily, pitrou, r.david.murray, ronaldoussoren
Date 2011-09-06.14:51:22
SpamBayes Score 9.85463e-10
Marked as misclassified No
Message-id <1315320684.27.0.879542353141.issue5845@psf.upfronthosting.co.za>
In-reply-to
Content
> Easily detecting interactive mode is of general interest for
> customization.
Thanks for the feedback.  We could open a feature request for that, and/or ask python-ideas.

> What if C also set sys.flags.interactive in "python" mode, or exposed
> sys.flags.implicit_interactive (but with better name)?
An attribute in the sys module sounds like a good idea.  It would not be an attribute of sys.flags though, as those are strictly command-line arguments.

> It's more useful to have a hook called when entering interactive mode, rather than a flag
> that's set from the beginning:
We already have such a hook: $PYTHONSTARTUP

> calling e.g. sys.__interactivehook__ sounds even better.
That’s another interesting idea.

> BTW, drawback of doing any such setup in site.py: "python -S" would be unfriendly!
People using -S don’t want the customizations done in site, so I don’t think there’s a problem here.
History
Date User Action Args
2011-09-06 14:51:24eric.araujosetrecipients: + eric.araujo, loewis, ronaldoussoren, cben, belopolsky, pitrou, ned.deily, r.david.murray, lesmana
2011-09-06 14:51:24eric.araujosetmessageid: <1315320684.27.0.879542353141.issue5845@psf.upfronthosting.co.za>
2011-09-06 14:51:23eric.araujolinkissue5845 messages
2011-09-06 14:51:23eric.araujocreate