Tkinter, swig and threads

Robert Naylor usenet at pobice.com
Mon Mar 24 21:50:16 EST 2003


I've not been using python that long and I'm trying to make a gui using 
tkinter.  The problem I have is that that some of the functions take quite 
a long a time to complete (although they spend most of their time asleep) - 
rendering the gui unusable for the period.  Usually this would be no 
problem but its the swig functions that take up this time - so most of the 
tricks I've seen in the threading examples don't work/apply.

One method I am curretnly thinking about is that I could re-write the c 
functions so that they recurse using python.  However the time period 
involved means that the total time its asleep could be over 15 min - and in 
it current form thats only over 255 (usually less) steps. However for the 
gui to be responsive extra steps would have to be added - say at least once 
a second making 900 instead. Does anyone know what the time cost of doing 
this is likekly to be?

Has anyone got any better soloutions to this? Ideally I'd like to also be 
able to stop the functions mid-way through if need be as well (easy to do 
in the above method).  

Thanks for any replies.


-- 
Robert Naylor aka Pobice (The Goblin) - http://www.pobice.com
ukmrr Chat Room  - http://www.pobice.com/radcliffe/ 
Gearstones Lodge - http://www.gearstones.com/
Need A Website?  - http://www.pobice.com/website/




More information about the Python-list mailing list