Q: maybe rlcompleter shouldn't expose __builtins__?
from comp.lang.python:
Thanks for the info. This choice of name is very confusing, to say the least. I used commandline completion with __buil TAB, and got __builtins__.
a simple way to avoid this problem is to change global_matches in rlcompleter.py so that it doesn't return this name. I suggest changing: if word[:n] == text: to if word[:n] == text and work != "__builtins__": Comments? (should we do a series of double-blind tests first? ;-) </F> "People Propose, Science Studies, Technology Conforms" -- Don Norman
Fredrik Lundh writes:
a simple way to avoid this problem is to change global_matches in rlcompleter.py so that it doesn't return this name. I suggest changing:
I've made the change in both global_matches() and attr_matches(); we don't want to see it as a module attribute any more than as a global. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org>
participants (2)
-
Fred L. Drake, Jr.
-
Fredrik Lundh