On 12/11/2022 5:09 AM, Chris Green wrote:
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.


resp = 'x'
while resp.lower() not in 'yn':
    resp = input("Did you say Y or did you say N?: ")




--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to