I have this script:<br><br>import time<br><br>def hello():<br>    print &quot;yay you got me to print&quot;<br><br>def longLoop():<br>    x = 0<br>    for n in range(100000):<br>        time.sleep(5)<br>        x = x + n<br>
        <br>longLoop()<br><br><br>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&#39;t think this is possible in the console.. and really I&#39;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&#39;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.<br>
<br>Can you help me with this?<br><br>Thanks. <br>-xbmuncher<br>