Combining Python/Tk & Tcl/Tk

Mike Clarkson support at internetdiscovery.com
Fri Nov 1 15:15:29 EST 2002


On Fri, 01 Nov 2002 18:35:37 +1100, Scott Smedley <scott at aao.gov.au>
wrote:

>Hi all,
>
>I'm new to Python & come from a Tcl/Tk background.
>
>Is it possible to integrate/embed Python/Tk with Tcl/Tk?
>
>I've read about a project called Minotaur, but that seems to
>be dead ... really dead.
>
>I'm interested because I've developed part of a GUI in Tcl/Tk &
>a project partner wants to develop their part of the GUI in
>Python/Tk.
>
>Thanks for any help/pointers.


For a more complete example of calling Python from Tcl and
calling Tcl from Python look at IDEStudio
    http://starship.python.net/crew/mike/Idle/

You may be also interested the automatic wrapping of Tcl Tix
objects in Tixapps/Utils/ObjtixPython.tcl. The latter gives a fairly
easy upgrade path from Tcl to Python:

1) Firstly, objectify your Tcl code as much as possible by
creating Objtix classes and methods for anything in Tcl you
want to get at from Python. This will still run under Tcl,
and will only improve your Tcl code.

2) Use the automatic ObjTix wrapper to make these classes
and methods available to Python.


Mike







More information about the Python-list mailing list