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. Advertisements

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,517
  2. Rick Osborn
    Replies:
    10
    Views:
    4,222
    Jon A. Cruz
    Feb 8, 2004
  3. jose flanigan
    Replies:
    0
    Views:
    460
    jose flanigan
    Jul 4, 2003
  4. Jane Austine

    Memory exception with Tkinter root.quit

    Jane Austine, Nov 18, 2003, in forum: Python
    Replies:
    1
    Views:
    435
    Irmen de Jong
    Nov 18, 2003
  5. Jane Austine

    Memory exception with Tkinter root.quit

    Jane Austine, Nov 18, 2003, in forum: Python
    Replies:
    3
    Views:
    1,731
    Jane Austine
    Nov 18, 2003
  6. hector
    Replies:
    5
    Views:
    649
    CBFalconer
    Dec 5, 2006
  7. Replies:
    5
    Views:
    1,809
    Roedy Green
    Jun 20, 2008
  8. bgabrhelik
    Replies:
    0
    Views:
    1,168
    bgabrhelik
    Sep 29, 2009
Loading...