At 01:13 AM 10/27/2007, Alan Gauld wrote: >Take a look at my Event Driven programming topic. It contains a >simple key echo program using msvcrt and instructions for Linux >users to convert it to use curses. > > From that you should be able to create a dual platform version.
Alan, I'm afraid I wasn't able to, using <http://www.freenetpages.co.uk/hp/alan.gauld/>. Especially because I couldn't test what I was coming up with. Could you do it for me, for this tiny script? =============================== #!/usr/bin/env python #coding=utf-8 import msvcrt while True: if msvcrt.kbhit(): key = msvcrt.getch() if key == "q": break elif key == "h": print "Hello" elif key == "b": print "Bye" =============================== Dick _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor