How to set time limit on raw_input
in python, is there a way to, while waiting for a user input, count time so that after, say 30 seconds, the raw_input() function is automatically skipped?
in python, is there a way to, while waiting for a user input, count time so that after, say 30 seconds, the raw_input() function is automatically skipped?
unfortunately raw_input is not doing what I need it to do. What I am trying to do is get totPrimes = whatever I type in at the prompt. If i replace while count < totPrimes with while count < 50 this script works. If I type 50 into the prompt, this script doesnt work, I’m afraid raw_input isn’t the function im looking to use? Here is a snippet of my code:
I am trying to mask what the user types into IDLE with asterisks so people around them can’t see what they’re typing/have typed in. I’m using basic raw input to collect what they type.
i know i can do this to get the effect of tab completion in python sure.
Is there a method that I can use to check if a raw_input is an integer?