0

i just thought i would ask as a reference for the future but if i was to have a loop like this:

import time
mytime = time.asctime()[11:19]
while mytime <= "13:14:15":
    mytime = time.asctime()[11:19]
    raw_input()

how could i change it so that mytime would constantly update as at the moment it will wait until the input is satisfied

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by leegeorg07
0

Sounds like you'd want to spawn two threads. One to constantly update mytime and another to wait on the user's input. Is that what you mean?

I'm pretty sure vegaseat has provided a number of examples of spawning threads with subprocess, try searching the forum for some good examples

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.