tkinter with multithreads

Ricardo Quesada core.lists.python at core-sdi.com
Thu Dec 13 17:52:17 EST 2001


Hi,
    I'm running python 2.0.1 with windows 2000,
    and i'm using multiple interpreters to run different python modules 
(like in mod-python),
    and everything works ok, except when I try to excecute two Tk 
modules simultaneously.
   
    It seems that they enter in deadlock. One tk modules locks in:
   
    file: _tkinter.c
    function: TkApp_MainLoop()

                PyThread_acquire_lock(tcl_lock, 1);        <---- Here 
(line 1683 )

And the other Tk modules locks in the tcl library (tck 8.3.4)

    file: tclTimer.c
    function: TclServiceIdle.c

               (*idlePtr->proc)(idlePtr->clientData);    <---- Here 
(line 692)

The tk module I'm running is very simple:
    def say_hi():
        print 'hi loco!'
   
    def run():
        import sys
        from Tkinter import *

        root = Tk()
        Button(root, text='button', command=say_hi).pack()
        root.mainloop()

Any ideas ?

thanks,
riq.  

-- 
===============[ CORE Security Technologies ]===============
Ricardo Quesada
Software Developer
ricardo.quesada at corest.com

Florida 141 - 2º cuerpo - 7º piso  |  (C1005AAC) Buenos Aires  |  Argentina
Tel/Fax: (54 11) 4878-CORE (2673)  |   http://www.corest.com
====================================================



--- for a personal reply use: Ricardo Quesada <riq at corest.com>




More information about the Python-list mailing list