Using the C Source Code from Tcl/Tk

Discussion in 'Python' started by Bgc, Aug 22, 2003.

  1. Bgc

    Bgc Guest

    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?
     
    Bgc, Aug 22, 2003
    #1
    1. Advertising

  2. Bgc

    Bgc Guest

    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?
     
    Bgc, Aug 23, 2003
    #2
    1. Advertising

  3. In article <>, 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
     
    David M. Cook, Aug 25, 2003
    #3
  4. Bgc

    Mark Roseman Guest

    Revitalizing Tk (was Re: Using the C Source Code from Tcl/Tk)

    "David M. Cook" <> 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
     
    Mark Roseman, Aug 25, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AAA

    TCL CODE WITH VHDL

    AAA, Dec 30, 2005, in forum: VHDL
    Replies:
    22
    Views:
    4,738
  2. K_Lee
    Replies:
    18
    Views:
    615
    Alex Martelli
    Nov 13, 2003
  3. Florian  Demmer

    Python 2.5 from source without tcl/tk

    Florian Demmer, Jul 3, 2007, in forum: Python
    Replies:
    1
    Views:
    640
    Florian Demmer
    Jul 4, 2007
  4. Replies:
    3
    Views:
    527
    alex23
    Mar 19, 2009
  5. Mumia W.

    Inline::Tcl vs. Inline::Tcl

    Mumia W., Aug 23, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    156
    Mumia W.
    Aug 23, 2006
Loading...

Share This Page