On Fri, Aug 2, 2013, at 0:47, Andrew Barnert wrote:
The quasi-standardized core of conio is definitely not enough to write a windowing library. Although some of the old DOS implementations had gotoxy, setfg, and setbg functions, the Win32 implementations don't have those; they just have… well, the same functions as MSVCRT's console APIs, which the stdlib already wraps
Yes, but it wraps them in msvcrt; I'm proposing moving it to a cross-platform "conio" module. I had for some reason thought there was a gotoxy function in there. Regardless, that's no reason not to add one to the python library. As for kbhit, you could probably implement it on unix with a call to select. If the tty file descriptor is ready for reading, then return true. The one possible wrinkle is that getwch could block if an incomplete multibyte character is read - something that cannot happen on windows.