0

Hello!
I have written a program where you have to give the path to directories and files as input. Is it possible to enable any kind of auto-completion when running the program?
Cheers!

Dani

5
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by cronos4d
0

Not really, unless it is provided by the OS.
In order to do something like this, I would think you would have to have access to the input stream, to monitor it before anything is actually flushed, which Python doesn't really give you.

0

woooee, In another thread you indicated to use termios. This is the only way I've been able to successfully capture the tab key, and then use my own logic to perform auto-completion. This was for a command-line program, I'm not working with the gui, otherwise I'd use your Tkinter example. Just wanted to say thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.