Using the C Source Code from Tcl/Tk

Bgc sscherer at rocketmail.com
Thu Aug 21 21:20:21 EDT 2003


Hello All,

I've been struggling for years now trying to come up with a solution
to a very personal programming problem with Python.  I'm an
educational programmer, and I make applications that are used in
educational environments by nontechnical folks.  I therefore need GUIs
that are pretty, easy to use, and cross platform (win, mac, linux,
unix).  In my search for a GUI, I've also come to the conclusion that
as much as I love Python, the GUI situation is less than perfect.  I
long for the day when I can use the following code on any platform
without worry:

import Gui

That being said, I like Tkinter module.  In some cases the Tk widgets
aren't "as good as Windows."  In some cases they're much better than
Windows.  For example, the Tk text widget allows you to dynamically
highlight text, insert images, insert other widgets, etc., etc.  For
someone like me who develops educational programs, the power of the Tk
text widget is invaluable.  My guess is that widgets like that are
possible because of the quality of the native C code underlying the
Tcl/Tk interpretive layer.  It's supposed to be some of the best C
code ever written.

After looking at Tcl/Tk for a while I considered dropping Python
altogether.  Until I looked at Tcl syntax.  I think that the Tcl
syntax is the reason that Tcl/Tk is having some popularity problems. 
Some would argue that the default Motif widgets are the problem, but
the default look of Tk has improved a lot over the years (and
extensions like PMW really help).

What is interesting right now is that the Tcl/Tk group is talking the
need to revitalize  Tcl/Tk:

http://tcl.projectforum.com/tk/Home

So, here the Python group is without a Python-native GUI (the Tkinter
module being a wrapper around Tcl/Tk).  And here is the Tcl/Tk group
struggling with the problem of Tcl's popularity (and maybe some of
that is Tk's fault, who knows).  And then there is that excellent
cross platform compatible C code sitting at Sourceforge under the BSD
license
  The mind boggles
 Maybe its time to take the C code
underlying Tcl/Tk and port it for Python-native use without the Tcl/Tk
layer?




More information about the Python-list mailing list