Hello, I'm writing a CLI app and there is a place, where user should to write path to using dir. Of couse, I can read it with raw_input(), but standart Completer can't autocomplete path by TAB. So is there any solution in python (or somewhere else) or should I to write my own Completer?
A:
Have a look at this SO question, the readline
module, and readline.clear_history()
/ readline.add_history()
.
chryss
2010-08-07 20:05:37
Yes, I can write function and make this with readline. But I hoped, that there is python module.Whatever thank for the anwer.
Ximik
2010-08-07 20:22:55
@Ximik: chryss actually meant the python readline module [here](http://docs.python.org/library/readline.html).
Muhammad Alkarouri
2010-08-07 21:13:19
Thanks, Muhammad, I did indeed. Added the link to make it easier to spot.
chryss
2010-08-07 21:18:59
@Muhammad Alkarour I understood, but default realization of Completer in this module doesn't support completion of the paths. In fact, this is my problem. But ok, seems like I have to write my own completer for readline.
Ximik
2010-08-07 22:10:27