On Mon, Sep 09, 2002 at 09:30:55PM +1200, Rob Brown-Bayliss wrote:
> 
> Hi,
> 
> I want to check a few sockets and respond fairly quickly in a gnome
> app.  
> 
> once up and running I do gtk.idle_add(self.check_comms) 
> 
> def check_comms(self):
>       rtoread, rtowrite, err = select.select(self.in_comms, self.out_comms,
> [], 1.0)
>       if (len(rtoread) != 0):
>               rtoread[0].handle_request()
>       gtk.idle_add(self.check_comms)

You can pass 0.0 as the timeout for select, which just polls the sockets
to see if anything is ready right now and then return. Or maybe I am
misunderstanding your problem?

Malcolm
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to