Tkinter
Jyrki Alakuijala
Jyrki.Alakuijala at iki.fi
Wed Apr 3 20:28:42 EST 2002
Would it be possible to offer an API access to the lines
static PyThread_type_lock tcl_lock = 0;
static PyThreadState *tcl_tstate = NULL;
currently hiding in the _tkinter.c.
Currently, I need to use my own tkinter modification to
overcome this problem.
My Tkinter-based program starts out as a python program,
The mouse events are taken as native evens for speed reasons
inside the my own tcl-widget and redirected back to the C++
computation backend. However, when the code execution
goes from there to python , which may invoke Tkinter,
it goes twice through the same Python->Tcl gate, messing
up with the locking system.
With my own tkinter, I can release the lock when I am back
in the C++ side and relock it again when returning to the tcl
system. Going to python via tcl would also be a solution, but
that is an architectural and performance nightmare.
This used to work so nicely with Python 1.4 - no thread support
there(?) - no python->tcl locking was implemented either...
best regards,
Jyrki Alakuijala
More information about the Python-list
mailing list