[Tkinter-discuss] Proposal for thread-safe Tkinter
ggpolo at gmail.com
Fri Oct 24 21:45:39 CEST 2008
On Fri, Oct 24, 2008 at 5:31 PM, Allen Taylor
<Allen.Taylor at mdacorporation.com> wrote:
> Hi Guilherme,
> The versions of Python and Tk used are the default packages installed on
> Linux (Ubuntu 6.06 LTS). I don't know whether the default install is
> compiled with --enable-threads or not. So, mtTkinter seems to be handy if
> you want to use the default installed packages?
To check for --enable-threads try this:
You will either get 1, or a TclError.
Also, I though you said latest tcl/tk versions but clearly tcl/tk
packages in Ubuntu 6.06 are not the latest.
But they also won't make a difference if you didn't recompile python
with these packages, I'm just telling this because right now Ubuntu
includes tcl/tk 8.5 but distributes python-tk compiled against tcl/tk
Maybe you could include one example where this new module makes a
difference ? We could be talking about different things. For instance,
threading.Thread(target=test, args=(text_widget, )).start()
lbl = Tkinter.Label()
lbl.after(10, lambda: try_it(lbl))
Would crash if tcl/tk were not compiled with --threads-enabled, but
then using your module it will run just fine.
-- Guilherme H. Polo Goncalves
More information about the Tkinter-discuss