rlcompleter not calling __getattr__ on [ ]
holger krekel
pyth at devel.trillke.net
Mon Apr 22 14:24:15 EDT 2002
On Mon, Apr 22, 2002 at 11:39:24AM -0600, Fernando P?rez wrote:
> Jaco Schieke wrote:
>
> > Looks like the regexp in rlcompleter that searches the string does not
> > work correctly. After changing the line
> >
> >> m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
> >
> > to
> >
> >> m = re.match(r"([\w\[\]]+(\.[\w\[\]]+)*)\.(\w*)", text)
or maybe even r"(\S+(\.\w+)*)\.(\w*)" ? This would principally
allow to add
"".<tab>
to work as expected. Of course you need to remove " and '
from the delimiter list.
But then again, i wonder if the rlcompleter should not simply
see the *whole* string and do the string-split according to delimiters
itself? This might be more flexible for 'general purpose' completion.
I consider the delimiters to be a rlcompleter property and
not a readline property.
holger
More information about the Python-list
mailing list