tags:

views:

53

answers:

1

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
Yes, I can write function and make this with readline. But I hoped, that there is python module.Whatever thank for the anwer.
Ximik
@Ximik: chryss actually meant the python readline module [here](http://docs.python.org/library/readline.html).
Muhammad Alkarouri
Thanks, Muhammad, I did indeed. Added the link to make it easier to spot.
chryss
@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