I would like to know if can be cleared the stdin after some key has been entered. I am doing an input timeout following a response from this forum like this one:
while True:
web_scrapping()
print ("Press ENTER: \n")
time.sleep(interval)
i, o, e = select.select( [sys.stdin], [], [], 10 )
if (i):
Start()
If works ok, check if some keystroke has been pressed and in case it does goes to the fuction Start(). But my problem is that Start() also has an input question, so the previous keystroke from the While True also transmit to the Start(), so the result is that the input question in Start() showes twice because the previous keystroke. So I would like to clear that keystroke before goes to Start(). Is that possible? Thanks