I have a command-line application that works similarly to a shell in that is continuously asks the user for a command and performs a certain action based on the command given. I'd like to implement the "scroll-back" or "history" feature to allow users to use the up and down arrow keys to navigate to and from previously entered lines. I have previously browsed the docs but can't figure it out. Any pointers?
Asked
Active
Viewed 632 times
0
-
You probably want readline, not curses. – Andrew Jaffe May 17 '12 at 22:48
-
@AndrewJaffe, Heh, I just now started looking at that. Thanks. Will update the question to reflect the correct module. – Tyler Crompton May 17 '12 at 22:49
1 Answers
1
Wow. I didn't think it'd be answered in the docs but it is. Another reason why I love Python. http://docs.python.org/py3k/library/readline.html

Tyler Crompton
- 12,284
- 14
- 65
- 94