Lars Hoss wrote:
>
> Hi everyone,
>
> I am new to this list, so I do not know wether
> this question was asked by someone else.
>
> I am working on a litle tool which helps me to
> synchronize two databases on different hosts.
> Now if I push the go button I want to show
> the progress with a progress bar. but
> due to the heavy calculations the GUI is frozen.
> So I tried to put the calculations into an extra thread,
> but this seems not to work?
>
> Anyone who can help me?
Generally, you have three choices here:
1 - You can do "while (events_pending()): mainiteration(FALSE)" within
your calculations to flush any pending events.
2 - Do the calculations in a separate thread. Note that control appears
to need to return to python for thread switches to occur, so you may
have to implement your event loop and calculations in python.
3 - Do the calculations in a separate process, using standard unix IPC
to communicate (pipes, sockets, shared memory, etc...)
Of the three, 2 sounds like the cleanest solution for your problem so
you are probably on the right track.
--
Richard Fish Enhanced Software Technologies, Inc.
Software Developer 4014 E Broadway Rd Suite 405
[EMAIL PROTECTED] Phoenix, AZ 85040
(602) 470-1115 http://www.estinc.com
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]