Message143608
> 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. |
|
Date |
User |
Action |
Args |
2011-09-06 14:51:24 | eric.araujo | set | recipients:
+ eric.araujo, loewis, ronaldoussoren, cben, belopolsky, pitrou, ned.deily, r.david.murray, lesmana |
2011-09-06 14:51:24 | eric.araujo | set | messageid: <1315320684.27.0.879542353141.issue5845@psf.upfronthosting.co.za> |
2011-09-06 14:51:23 | eric.araujo | link | issue5845 messages |
2011-09-06 14:51:23 | eric.araujo | create | |
|