0

If I have a thread running in the background, is there any way it can retrieve from Python's raw_input what has been typed so far? Example: User is sitting at prompt and typing away. I would like to receive what has been typed so far at the 5 second mark, 10 second mark, etc.

Relatedly, is there any type of KeyboardEvent indicating that typing is going on?

Additionally, is there any way to modify raw_input's buffer? Clear the buffer from a different thread?

For threading I'm using the 'signal' module.

ChaimKut
  • 2,759
  • 3
  • 38
  • 64

0 Answers0