how-to use readline.set_completion_display_matches_hook()?
Jean-Pierre Miceli
j-p at sunrise.ch
Wed Nov 7 05:36:20 EST 2012
More information about the Python-list mailing list
Wed Nov 7 05:36:20 EST 2012
- Previous message (by thread): chocolate moonpies
- Next message (by thread): how-to use readline.set_completion_display_matches_hook()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
I'm working on a tool which enable support of tab completion using the
readline modul.
And I have a problem with set_completion_display_matches_hook function
I've created a display hook function and registered it. It is called
and it prints the desire messages. But once it has completed,
readline/python does not display the prompt.
I've got to press the 'return' key to see the prompt again.
What should the display hook function do to return correctly and let
the prompt be displayed?
Example:
def completerHook(self, substitution, matches, longest_match_length):
print ""
print "Test of the display hook function"
for i in range(len(matches)):
print matches[i],
I use Python 2.7.3 and done some tests on Mac OS 10.7 (Lion) and
Ubuntu. I got the same issue on both system.
Thanks for your help
J-P
- Previous message (by thread): chocolate moonpies
- Next message (by thread): how-to use readline.set_completion_display_matches_hook()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list