Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Using the C Source Code from Tcl/Tk

Reply
Thread Tools

Using the C Source Code from Tcl/Tk

 
 
Bgc
Guest
Posts: n/a
 
      08-22-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?
 
Reply With Quote
 
 
 
 
Bgc
Guest
Posts: n/a
 
      08-23-2003
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

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

 
Reply With Quote
 
 
 
 
David M. Cook
Guest
Posts: n/a
 
      08-25-2003
In article <(E-Mail Removed) >, Bgc wrote:

> 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
 
Reply With Quote
 
Mark Roseman
Guest
Posts: n/a
 
      08-25-2003
"David M. Cook" <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Panel with vivible=false in source code / large source Jens-Oliver Murer ASP .Net 1 10-17-2008 01:00 PM
source code analysis/code coverage tool experience bill turner Java 2 07-19-2005 03:02 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi C Programming 0 12-29-2004 05:10 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
can't use View, Source menu to open the source code. Jenny Javascript 3 12-17-2004 07:01 AM



Advertisments