Interrupting a GUI function call? (wxWindows Specifically)

Daniel Frame dframe at tampabay.rr.com
Thu May 24 22:47:54 EDT 2001


Hello Python Gurus,

I have what I think is a simple question, but I can't seem to find the
answer online, or in any Python Books that I have.

Basically, I've constructed a GUI with wxPython which runs a very long
function when a 'START' button is pressed.

Of course, the GUI is 'locked up' until this function completes
itself.  I was wanting to add a 'STOP' button to my application which
would halt this other function if the user got tired of waiting for it
to complete.

Is it possible to accomplish this without resorting to using threads?

If so, How can I have my running function check occaisonally to see if
the stop button was pressed?

I've heard of wxYield, but I can't seem to  implement it properly.

Thanks in advance for any expertise that you can offer.








More information about the Python-list mailing list