Pausing Loop
Ken Seehof
12klat at sightreader.com
Tue Jun 6 09:24:07 EDT 2000
dsavitsk wrote:
> is there a way to conditionally pause a loop until some event (button press)
> takes place? opening a modal window is not my first choice, but i don't
> know another way of doing it.
> (this needs to be using tkinter on win32 if that makes a difference)
> thanks again
> doug
Sounds like you need to use threads. Read about the 'threading' module.
The idea is that you would run your loop in a separate thread from the GUI
thread. This has the additional benefit of keeping your GUI running while the
loop is running. When you pause, create a lock which gets released when the
desired event occurs in the GUI thread..
- Ken Seehof
kens at sightreader.com
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12klat.vcf
Type: text/x-vcard
Size: 343 bytes
Desc: Card for Ken Seehof
URL: <http://mail.python.org/pipermail/python-list/attachments/20000606/25e4649d/attachment.vcf>
More information about the Python-list
mailing list