I have this script:
import time
def hello():
print "yay you got me to print"
def longLoop():
x = 0
for n in range(100000):
time.sleep(5)
x = x + n
longLoop()
It will run in the console for a long time. How can I send a command and
cause it to stop and pursue hello() function? I don't think this is possible
in the console.. and really I'd like to create a GUI that will run the
longLoop() function after I push a button and then press another button to
stop the longLoop() function and run the hello() function. How can I do this
in the wxPython, which is gui of choice for python. I'll settle for a way to
do it via console as well. The overall idea is, is that I want to cut short
the process of a piece of code in order to start another piece of code.
Can you help me with this?
Thanks.
-xbmuncher
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor