[issue5845] rlcompleter should be enabled automatically
Cherniavsky Beni
report at bugs.python.org
Mon Sep 5 20:29:39 CEST 2011
Cherniavsky Beni <beni at google.com> added the comment:
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!
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5845>
_______________________________________
More information about the Python-bugs-list
mailing list