Thread and tkMessageBox (Synchonimous)

Discussion in 'Python' started by Askari, Dec 22, 2003.

  1. Askari

    Askari Guest

    I think that my problem is in the syncho between main thread and my
    thread created with (with thread.start_new_thread(...) ). But, I don't
    understand the method for syncho with a thread...

    I want pop a message to user with
    tkMessageBox.showinfo("Title","Message") but when this command is in
    my thread, it's don't work (and my main thread give no reponse
    (crash)).

    How I can pop a message (or question) with a thread?

    Askari
    Askari, Dec 22, 2003
    #1
    1. Advertising

  2. Askari

    Jp Calderone Guest

    On Mon, Dec 22, 2003 at 03:34:10AM -0800, Askari wrote:
    > I think that my problem is in the syncho between main thread and my
    > thread created with (with thread.start_new_thread(...) ). But, I don't
    > understand the method for syncho with a thread...
    >
    > I want pop a message to user with
    > tkMessageBox.showinfo("Title","Message") but when this command is in
    > my thread, it's don't work (and my main thread give no reponse
    > (crash)).
    >
    > How I can pop a message (or question) with a thread?
    >


    All Tkinter calls must be made in the main thread. Perhaps you can solve
    this problem by making the showinfo call in the main thread and running your
    own code in another thread, or perhaps you can solve it by displaying GUI
    widgets using non-blocking APIs, thus obviating the need for threads at all.

    Jp

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQE/5v+8edcO2BJA+4YRAmGHAKCujOQuC/FAYmxGLz1WTg7ctqNFDgCcDcVc
    mKfonWoCb2cZq6QZouoKcZw=
    =CaKi
    -----END PGP SIGNATURE-----
    Jp Calderone, Dec 22, 2003
    #2
    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. Peter Kleiweg
    Replies:
    4
    Views:
    824
    Peter Kleiweg
    Sep 7, 2004
  2. Peter Kleiweg
    Replies:
    1
    Views:
    461
    Peter Kleiweg
    Sep 8, 2004
  3. Ajay

    thread and tkMessageBox

    Ajay, Sep 17, 2004, in forum: Python
    Replies:
    2
    Views:
    540
  4. Replies:
    6
    Views:
    448
  5. Fabio Z Tessitore

    Error with Tkinter and tkMessageBox

    Fabio Z Tessitore, Jul 31, 2007, in forum: Python
    Replies:
    9
    Views:
    629
    Fabio Z Tessitore
    Aug 3, 2007
Loading...

Share This Page