rlcompleter2 issues
home install issues
 

Issue13 Editing

TitleTab completion of module name doesn't work
Prioritybug Statuschatting
Superseder Nosy Listpeter
Assigned To Topics

Created on 2005-04-16.06:14:16 by peter, last changed 2007-10-09.00:09:20.

Messages
msg30 Author: marc Date: 2007-10-09.00:09:20 remove
It would be nice if there was a maintenance release with 
the patch by piro, since this bug affects all global names, 
i.e. all builtin names.
msg28 Author: piro Date: 2006-06-28.14:52:56 remove
Since (boh) the module "keyword" chenged: there is no more a
dict called "kwdict". The following patch fixed the problem.

actually there is a difference w.r.t. the attribute
behaviour: if i define "aaaaa" and "aaaab", pressing
"aa<tab>" shows the possible completions, but it doesn't
complete up to "aaaa". When the prefix is not ambiguous, the
word is fully completed.

btw, is this project still alive?

@@ -339,7 +339,10 @@
     """return (interactive) global scope for a module."""
     scope = vars(__builtin__)
     scope.update(vars(module))
-    scope.update(keyword.kwdict)
+    if hasattr(keyword, 'kwdict'):
+        scope.update(keyword.kwdict)
+    elif hasattr(keyword, 'kwlist'):
+        scope.update(dict([ (k, k) for k in keyword.kwlist ]))
     return scope

 def docstring(obj):
msg25 Author: peter Date: 2005-04-16.06:14:16 remove
After importing rlcompleter2, hit tab at the >>> prompt. A
list of the entries in the global namespace. Which is good.
But try something like:

>>> import sys
>>> sy<tab>

and nothing happens. I would expect that the tab either
completes the sys or that the list of items in the namespace
that start with sy would be displayed.

For contrast, if you type

>>> sys.m<tab>

the list of items in the sys namespace that begin with m is
displayed. Typing:

>>> sys.mo<tab>

will complete the text as sys.modules.

It would be really nice if the rlcompleter2 worked the same
at the global level as it does at the module level.

BTW, this is seen running Python 2.4.1 on a Ubuntu 5.04 system.
History
Date User Action Args
2007-10-09 00:09:20marcsetmessages: + msg30
2006-06-28 14:52:56pirosetstatus: unread
messages: + msg28
2005-04-16 06:14:16petercreate