embedding stubbed tcl

laurent.duperval at cgi.ca laurent.duperval at cgi.ca
Tue Nov 2 09:23:31 EST 1999

On  2 Nov, Robin Becker wrote:
> Python uses tkinter which embeds tcl and tk. At present python 1.5.2
> comes with a dll that explicitly links to tcl80.dll. having just moved
> to the latest tcl8.2.1 I have to recompile this dll and with a very few
> minor changes all works ok. What happens when 8.3 appears? I guess I
> have to do this again :(

Maybe not.

> What is the simplest way to avoid this pain using stubs? I mean what are
> the guaranteed entry points in the dlls. I need the interp pointer
> before I can start off the stubs interface and it seems that the first
> thing done by tkinter does is Tcl_CreateInterp followed by
> TclpInitLibraryPath(baseName). The latter appears not to be in the stubs
> library. Therefore it seems as though tkinter is not stubs friendly. I
> guess that the embedding structure for tkinter is a bit out of sync with
> the correct way of doing things.

Stubs were not included in the core until 8.1.x and 8.2.x. So your situation
is normal. But if you follow the TEA guidelines and stubify tkinter, you
should not have any problems when upgrading to a new version. I know for a
fact that this worked for me when I upgraded from wish 8.1.x to 8.2.x: I
didn't need to recompile the Img extension, which was properly stubified.


Penguin Power!           Nothing I say reflects the views of my employer

Laurent Duperval                          mailto:laurent.duperval at cgi.ca
CGI - FWFM Project                                 Phone: (514) 350-3368

More information about the Python-list mailing list