Good day! I have a problem with Python and the input buffer. My application must read a barcode from PS2 and then process it. The problem is: i have to discard all characters inserted in buffer while Elaborate(data) is running. I tried to clear the buffer using sys.stdin.flush() but it seem not work. proc Principale() : while True # sys.stdin.flush() data = sys.stdin.readline() Elaborate(data) proc Elaborate() : sleep(5) I'll apreciate any help! Thanks