unbuffered input

M

michael young

Hi,
I have a numbered menu that I want users to from. They choose the
number corresponding to the action they wish to take.
Right now I'm using input() to get the user's responce. They press the
number then press ENTER. I would like to skip the
part where they press ENTER, so that the user presses the number and
then they get the action they chose without having
to press ENTER. Is there a way to do this and how?

thank you for you time,
Michael Young
 
D

Diez B. Roggisch

I have a numbered menu that I want users to from. They choose the
number corresponding to the action they wish to take.
Right now I'm using input() to get the user's responce. They press the
number then press ENTER. I would like to skip the
part where they press ENTER, so that the user presses the number and
then they get the action they chose without having
to press ENTER. Is there a way to do this and how?

Look into the curses module and its raw-mode.

Regards,

Diez B. Roggisch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top