Is there a way to check if there is anything entered in the shell without using raw_input?
For example instead of having something like question = raw_input("Enter Q to quit")
I just want to read if anything is entered into the shell, "Q" and quit.
The reason I need this is because I don't want to block my program from executing with the raw_input
. I need it to periodically check at any given point if "Q" is entered at all.