470,580 Members | 2,213 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,580 developers. It's quick & easy.

pygtk + threading.Timer

Hello!
I have simple chat application with pygtk UI. I want some event (for
example update user list) to have place every n seconds.
What's the best way to archive it?
I tried threading.Timer but result is following: all events wait till
exit of gtk main loop and only then they occur.
Thanks in advance
Jun 27 '08 #1
2 1982
Dmitry Teslenko napisał(a):
I have simple chat application with pygtk UI. I want some event (for
example update user list) to have place every n seconds.
What's the best way to archive it?
I tried threading.Timer but result is following: all events wait till
exit of gtk main loop and only then they occur.
Thanks in advance
See gobject.timeout_add documentation in pygtk reference

--
Jarek Zgoda
Skype: jzgoda | GTalk: zg***@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)
Jun 27 '08 #2
2008/4/14 Jarek Zgoda <jz****@o2.usun.pl>:
I have simple chat application with pygtk UI. I want some event (for
example update user list) to have place every n seconds.
What's the best way to archive it?
I tried threading.Timer but result is following: all events wait till
exit of gtk main loop and only then they occur.
Thanks in advance

See gobject.timeout_add documentation in pygtk reference
Thanks. That's exactly what I need.
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Arne Schwabe | last post: by
2 posts views Thread by Samuele Giovanni Tonon | last post: by
6 posts views Thread by whtinkm | last post: by
reply views Thread by kingcrowbar.list | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.