unbuffered input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • michael young

    unbuffered input

    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



  • Diez B. Roggisch

    #2
    Re: unbuffered input

    > I have a numbered menu that I want users to from. They choose the[color=blue]
    > 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?[/color]

    Look into the curses module and its raw-mode.

    Regards,

    Diez B. Roggisch

    Comment

    Working...