I am executing the code below on a Windows XP system and if I enter > 2 characters it buffers the input and the call to sys.stdin.flush does not flush the input, it remains buffered.
 
What am I doing wrong here?
 
Thanks,
 
Caolan
 
        try:
            gooberselectX = sys.stdin.read(2)
        except IOError, e:
            print 'error reading from stdin device'
        except KeyboardInterrupt, e:
            print 'you cannot break. please use the \'q\' key to exit'
        else:
            try:
                sys.stdin.flush()
            except IOError, e:
                print 'error flushing buffered input'
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to