+ 2
Multiple function at same time python
i want to make program that saying this: in count 10, you need to input the answer correctly. so after the count 10 finished,it will exit().how to do that? im confuse because the input() function will wait for input,no matter if the time is up.
5 Answers
+ 4
Some tracks in this thread:
https://stackoverflow.com/questions/15528939/JUMP_LINK__&&__python__&&__JUMP_LINK-3-timed-input
... but maybe complete solution (previous ones don't interrupt the input) to be found among the answers of this one:
https://stackoverflow.com/questions/492519/timeout-on-a-function-call
[edit]
And finally, this answer may help to do input inside a process (the track I would follow would be to do input inside process to be able to kill it after delay... but stdin is default closed for sub-process, and we need close the one of main process and reopeen it in the sub-process ^^ This mean also that we have to handle queue to communicate data between process, if I understand right ;P)...
https://stackoverflow.com/questions/7489967/python-using-stdin-in-child-process/15766145#15766145
+ 3
Yeah: that's not the most simple part of programming ^^
But that's an interesting part, anyway ;)
0
damn.its so difficult to understand.almost a day to find out what is those code mean
0
but thanx anyway
0
true