<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY>
<DIV><FONT face='Arial' color=#000000 size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What am I doing wrong here?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Caolan</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000000 
size=2>        
try:<BR>            
gooberselectX = sys.stdin.read(2)<BR>        
except IOError, 
e:<BR>            print 
'error reading from stdin device'<BR>        
except KeyboardInterrupt, 
e:<BR>            print 
'you cannot break. please use the \'q\' key to 
exit'<BR>        
else:<BR>            
try:<BR>                
sys.stdin.flush()<BR>            
except IOError, 
e:<BR>                
print 'error flushing buffered input'</FONT></DIV></BODY></HTML>