Using TCL files in Python ?

Cameron Laird claird at lairds.us
Wed May 11 07:08:02 EDT 2005


In article <pan.2005.05.11.09.15.00.27816 at optushome.com.au>,
Peter Moscatt  <pgmoscatt at optushome.com.au> wrote:
>I am reasonably new to programming in Python. [Using LINUX]
>
>Up until now I have been using GUI widgets supplied by 'Tkinter' but
>starting to realise that Tkinter have limited widgets.
>
>I have been given the lead that I should look at other sources for GUI
>widgets - namely TCL.
>
>I have just done a search for 'tcl' files on my 'Fedora 3' installation
>and find I have available:
>
>  Tix8.1
>  Tcl8.4
>  Tk8.4
>
>I have never used TCL code under Python so I assume I can use widgets from
>any of these providers ?
>
>Where is a good resource I can use to help understand how to use TCL files
>in Python ?
			.
			.
			.
It's likely to take a few rounds to make these things clear.  I'll start.

You want more widgets than base Tkinter supplies.  I understand that.
Please read <URL: http://starship.python.net/crew/cjr/tkinter.html >.

It is indeed useful to look to Tcl for functionality to use in Tkinter.
I detect a couple of missteps in how you're thinking about this, though.
First, Tcl adepts generally speak of "Tk" or "Tcl/Tk" when considering
widgetry; in idiomatic Tcl-speak, "Tcl" itself has no widgets.

You're right to mention Tix, Tk, and Tcl as Tcl-related installations
Fedora includes.  There actually are a few more, but you needn't concern
yourself with them now.  Of these, Tkinter already includes all the
functionality of Tcl and Tk, and the hyperlink provided above explains
Tix.

What if you encounter other Tcl packages?  Keep in mind that many Tcl
packages have nothing to do with graphical user interfaces (GUIs); they
do network programming or satellite management or locomotive control or
other domain-specific stuff that's orthogonal to GUIing.  Tkinter *can*,
generally, exploit Tcl-coded GUI extensions.  One of us will follow-up
with a reference to that topic.



More information about the Python-list mailing list