"Bill Allen" <walle...@gmail.com> wrote

I have found that for the Windows build of Python the msvcrt library
provides getch() and kbhit() functions. Is there a library available for
the Linux Python build that provides the same or similar functions?

curses.

Take a look at the event handling topic in my tutor for examples
comparing msvcrt and curses.

I'm not sure if curses provides a kbhit() equivalent but you can
usually simulate the effect by using a combination of getch()
and ungetch() - not pretty but it works.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to