tkinter: call root.after from a thread?

Discussion in 'Python' started by Benjamin Rutt, Mar 17, 2005.

  1. Let's say we have

    root = Tk()
    .... <layout gui, spawn thread etc....>
    root.mainloop()

    Is a safe to call the method root.after(...) from a separate thread?
    (The registered callback updates the GUI). I know you're supposed to
    avoid calling methods such as pack(), etc. from a thread, but I was
    wondering if calling root.after() would be safe? I'm doing this in a
    GUI without any problems, so far. Thanks,
    --
    Benjamin Rutt
    Benjamin Rutt, Mar 17, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,214
  2. Rick Osborn
    Replies:
    10
    Views:
    3,953
    Jon A. Cruz
    Feb 8, 2004
  3. hector
    Replies:
    5
    Views:
    409
    CBFalconer
    Dec 5, 2006
  4. Replies:
    5
    Views:
    1,608
    Roedy Green
    Jun 20, 2008
  5. bgabrhelik
    Replies:
    0
    Views:
    801
    bgabrhelik
    Sep 29, 2009
Loading...

Share This Page