[pygtk] Refresh window

John Ehresman jpe at wingware.com
Fri Dec 2 09:27:25 WST 2005


Genie Fomina wrote:
> Gustavo, thank you for your reply, that looks promising. But it requires 
> pygtk 2.8 for some reason. I am not sure I will be able to use this 
> version everywhere I will put my application to. There might be 2.6 or 
> even 2.4 versions. What is the right way of working with sockets and 
> refreshing windows in these versions?

Is your problem reading everything from a socket or doing something else 
that requires a fair amount of time?  If it is reading from a socket, 
structure your program to only read whatever is available in a callback 
then return and let the mainloop call you again when there's more to 
read.  If the problem is doing something else, break the task up into 
multiple steps and the schedule an idle or timeout for each one.

John


More information about the pygtk mailing list