edit: There is a typo in the title. The last word should be "timer" not "timert"
I know very little about programming. I've completed a few python tutorials several years ago, but I never stepped-up my knowledge. So I'm still a newb (actually I'm worse than a newb, but I know of no such term to designate that status). Frankly I have no aptitude for this, but I'm trying because programming knowledge is worthy of pursuit.
My current project, which is still in the conceptual stage, is a very simple game that will present the user with various scenarios and about 4 possible decisions per scenario (depending on the scenario). To add some excitement, I want there to be a countdown that will end the game if the user runs out of time without making a valid decision.
There are two things that I need to know in order for me to move forward and implement the above:
1. I need to know the function (and, if applicable, the library I'll need to import in order to use it), that can cause a 1-second delay. I figure that I would use it in a loop to put a "halt" in the countdown. Of course it won't be exactly 1-second between numbers because of the execution time, but it's close enough for me.
2. I need to know how to allow this countdown to go forward, while, at the same time having the program "listen" for the user's selection. I have no idea how to accomplish this. I know only of raw_input, and that brings the execution sequence to a screeching halt so it can await the user's input.
Any suggestions?
Thanks in advance.
Bookmarks