Message143554
Easily detecting interactive mode is of general interest for customization.
1. What if C also set sys.flags.interactive in "python" mode,
or exposed sys.flags.implicit_interactive (but with better name)?
2. It's more useful to have a hook called when entering interactive mode,
rather than a flag that's set from the beginning:
$ python -i -c 'import sys; print sys.flags.interactive'
1
>>>
For this, importing _setupinteractive is a step forward;
calling e.g. sys.__interactivehook__ sounds even better.
(site.py would set it by default to a function that enables
rlcompleter, user can always override...)
BTW, drawback of doing any such setup in site.py: "python -S" would
be unfriendly! |
|
Date |
User |
Action |
Args |
2011-09-05 18:29:39 | cben | set | recipients:
+ cben, loewis, ronaldoussoren, belopolsky, pitrou, ned.deily, eric.araujo, r.david.murray, lesmana |
2011-09-05 18:29:39 | cben | set | messageid: <1315247379.39.0.723748019545.issue5845@psf.upfronthosting.co.za> |
2011-09-05 18:29:38 | cben | link | issue5845 messages |
2011-09-05 18:29:38 | cben | create | |
|