createfilehandler, how to use it with Tk?

algaba at my-deja.com algaba at my-deja.com
Mon Jul 26 14:13:38 EDT 1999


In article <012c01bed77a$d562b370$f29b12c2 at secret.pythonware.com>,
  "Fredrik Lundh" <fredrik at pythonware.com> wrote:
> algaba at my-deja.com wrote:
> > I have to communicate a tk front end with another modules.
> > And I'm trying:

> forget about createfilehandler. use asyncore/asynchat instead:
> http://www.python.org/doc/current/lib/module-asyncore.html
>
> to use them under Tk, you can use a
> simple polling scheme:
>
>             asyncore.poll(0.05)
>             self.master.after(100, self.poll)
>         except:
>             pass # error in network callback
>
> ...
>
asyncore is a new module ? I can't find it in my python 1.5.1

Anyway, thanks.
And... what's the difference between this and a simple
loop with time.sleep(0.001), ... a bit of more freedom?
Thanks


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list