how to determine an 'open' string?

holger krekel pyth at devel.trillke.net
Fri May 17 05:12:01 EDT 2002


Michael Hudson wrote:
> [me]
> > [you]
> > > 
> > > You're going to have fun with strings containing spaces aren't you?
> > 
> > huh? not that i know of :-)
> 
> Because of the way readline works.  It calls the completer function
> with the word stem, so if the buffer looks like
> 
> >>> "a very long string
>                        ^
> when you hit TAB the completer will get sent just "string" (I think).

Actually what you get is everything from the last 'delimiter'. 
Delimiters are set via readline.set_completer_delims(delims_str).

With my implementation completer_delims are set to the empty string.
i want to have the complete line up to the cursor. This is because 
you cannot find any good delimiter set capable of helping you
with the python-expression. 

cheers,

    holger





More information about the Python-list mailing list