4

In my python linux console application I use curses to handle displaying of data. At the same time I'd like to have an input line to enter commands, pretty much in good ol' irssi-style. With default curses getch() I'd have to do a lot of coding just to get the basic funcionality of raw_input function - arrow keys to move cursor / browse through the input history.

Is there a simple way to get such behavior working with curses, as it captures input events and I can't just use functions that read sys.stdin.

1 Answer 1

1

Use curses.textpad

http://www.python.org/doc/2.4.1/lib/module-curses.textpad.html

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I'm now wondering, since textpad is limited in size to a window size, can I make it accept more text then the window size? Should I use pad instead of window?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.