Using the C Source Code from Tcl/Tk

B

Bgc

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?
 
B

Bgc

I had a look at Tcl/Tk. And you know what? I like it better than
Python. I'm sick of "bindings" for everything. Tcl/Tk is just
awesome, so why not use it instead? That's what I'm going to do.
What a relief. Sorry if I offended any Tclers with the original post.
I'm very excited, and relieved about my decision.

Steve
 
D

David M. Cook

I had a look at Tcl/Tk. And you know what? I like it better than
Python. I'm sick of "bindings" for everything. Tcl/Tk is just
awesome, so why not use it instead? That's what I'm going to do.
What a relief. Sorry if I offended any Tclers with the original post.
I'm very excited, and relieved about my decision.

Heretic!

I suppose going through the tcl interpreter is not an ideal situation, but
it works, and I've seen some pretty amazing things done with Tkinter. I
prefer pygtk, though. Tk is beginning to show its age, though the text and
canvas widgets are still strong points.

Dave Cook
 
M

Mark Roseman

David M. Cook said:
I suppose going through the tcl interpreter is not an ideal situation, but
it works, and I've seen some pretty amazing things done with Tkinter. I
prefer pygtk, though. Tk is beginning to show its age, though the text and
canvas widgets are still strong points.


As an earlier poster mentioned, there is an effort underway to
update Tk and really brush the dust off of it. People who know
Tk can make it look good with a lot of option tweaking and
bringing in third-party widgets, but we'd like to see it work
a bit better right out of the box.

Anyway, as mentioned, more info on this effort is here:
http://tcl.projectforum.com/tk/

As one of the people behind this effort (yeah I use Tcl), we'd
be very happy to see a lot of Python folks involved. Have a peek
at the site, and if you still have questions, post there or please
feel free to email me.

As an aside, many of us in the Tcl community who are doing
professional-level apps have struggled with the choices for a
GUI toolkit, and have calculated that improving Tk is not that
much work, and doing that would be the best alternative for a
fairly large class of development needs. Most of us are pretty
pragmatic and not hugely wedded to Tcl (lots of us like Python
too), though we do like a lot of what Tcl does offer, including
Tk and other goodies.

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top