Python continuously parse console input

Viewed 2145

I am writing a little Python script that parses the input from a QR reader (which is seen as a keyboard by the system).

At the moment I am using raw_input() but this function waits for an EOF/end-of-line symbol in order to submit the received string to the program. I am wondering if there is a way to continuously parse the input string and not just in chunks limited by a line end.

In practice: - is there a way in python to asynchronously and continuously parse a console input ? - is there a way to change raw_input() (or an equivalent function) to look for another character in order to submit the string read into the program?

1 Answers
Related