pygtk + threading.Timer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dmitry Teslenko

    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
  • Jarek Zgoda

    #2
    Re: pygtk + threading.Timer

    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: zgoda@jabber.as ter.pl | voice: +48228430101

    "We read Knuth so you don't have to." (Tim Peters)

    Comment

    • Dmitry Teslenko

      #3
      Re: pygtk + threading.Timer

      2008/4/14 Jarek Zgoda <jzgoda@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.

      Comment

      Working...