Does one have to use curses to read single characters from keyboard?

Chris Green cl at isbd.net
Sun Dec 11 05:09:59 EST 2022


Is the only way to read single characters from the keyboard to use
curses.cbreak() or curses.raw()?  If so how do I then read characters,
it's not at all obvious from the curses documentation as that seems to
think I'm using a GUI in some shape or form.

All I actually want to do is get 'Y' or 'N' answers to questions on
the command line.

Searching for ways to do this produces what seem to me rather clumsy
ways of doing it.

-- 
Chris Green
·


More information about the Python-list mailing list