Is there a way of reading one single character from the user input? For instance, they press one key at the terminal and it is returned (sort of like getch()). I know there’s a function in Windows for it, but I’d like something that is cross-platform.
Is there a way of reading one single character from the user input? For
Share
Here’s a link to the ActiveState Recipes site that says how you can read a single character in Windows, Linux and OSX:
getch()-like unbuffered character reading from stdin on both Windows and Unix