converting from tcl/tkl to python

Discussion in 'Python' started by Richard Boothroyd, Mar 9, 2012.

  1. Hi there,

    First, I am not a developer so go easy on my ignorance ;-). Our
    company designs and develops hearing aid audibility fitting equipment.
    (www.audioscan.com). Our current software GUI is all based on TCL/TKL
    and we are running into issues on developing a "prettier" GUI in an
    effort to modernize some of our equipment.

    My understanding is that Python is a much better GUI tool than TCL/TKL
    so I'd appreciate any insight on this assumption. Also I'm wondering
    what kind of effort and expertise it would take to convert from TCL/
    TKL to Python. Let me know what further info you may require.

    Also, if there is anyone out there that has specific expertise in
    performing this conversion please contact me.

    Thanks
    Richard Boothroyd
    General Manager
    Audioscan
     
    Richard Boothroyd, Mar 9, 2012
    #1
    1. Advertising

  2. Richard Boothroyd

    Rod Person Guest

    On Fri, 9 Mar 2012 07:10:19 -0800 (PST)
    Richard Boothroyd <> wrote:

    > Hi there,
    >
    > First, I am not a developer so go easy on my ignorance ;-). Our
    > company designs and develops hearing aid audibility fitting equipment.
    > (www.audioscan.com). Our current software GUI is all based on TCL/TKL
    > and we are running into issues on developing a "prettier" GUI in an
    > effort to modernize some of our equipment.


    Have you looked at Tile? It a theme-able widget set for Tk.
    http://wiki.tcl.tk/11075

    As for python, the default GUI toolkit for Python is Tk, but there are
    bindings that allow you to use WxWidgets, Qt and GTK.





    --

    Rod Person http://www.rodperson.com

    'Silence is a fence around wisdom'
     
    Rod Person, Mar 9, 2012
    #2
    1. Advertising

  3. Richard Boothroyd

    Kevin Walzer Guest

    On 3/9/12 10:10 AM, Richard Boothroyd wrote:

    > First, I am not a developer so go easy on my ignorance ;-). Our
    > company designs and develops hearing aid audibility fitting equipment.
    > (www.audioscan.com). Our current software GUI is all based on TCL/TKL
    > and we are running into issues on developing a "prettier" GUI in an
    > effort to modernize some of our equipment.
    >
    > My understanding is that Python is a much better GUI tool than TCL/TKL
    > so I'd appreciate any insight on this assumption. Also I'm wondering
    > what kind of effort and expertise it would take to convert from TCL/
    > TKL to Python. Let me know what further info you may require.
    >


    First, don't assume that Tcl/Tk is not up to the job. I took a look at
    some of your software screenshots at your website and noticed that you
    are using the "classic" Tk widgets, which, while functional, are a bit
    dated in their appearance. Tcl/Tk 8.5 has added a separate group of
    widgets called the ttk (for "themed Tk") widgets that are fully native
    in appearance on Windows/Mac and much improved in their appearance on
    Linux/Unix. Here's a screenshot of a Tcl/Tk app using the ttk widgets on
    Windows:

    http://sourceforge.net/p/windowstoolset/screenshot/screenshot.png

    If modernizing the UI is all you need to do, a careful update of your
    code using the themed Tk widgets will take you a long way, with far less
    work and cost than porting your code to Python.

    Having said this, if you are seeing other issues with Tcl (lack of
    support for certain libraries/API's, code is becoming unmanagable, etc.)
    and you have concluded that Python is a superior choice overall, then
    there are a number of different routes you can take:

    1. Python's built-in GUI toolkit is a wrapper for Tk called Tkinter.
    Recent versions of Python support the themed Tk widgets as well as the
    classic Tk widgets. Doing a port of your code from Tcl/Tk to Python will
    be somewhat simpler if you use Python's Tkinter library, because the
    general layout will be similar. However, there are no automated tools
    for mapping Tk to Tkinter that I am aware of--you will have to do a
    rewrite of your code.

    2. Python also has bindings for many other UI toolkits, including
    wxWidgets (a very nice cross-platform toolkit that has native UI
    bindings), Qt, Gtk, and others. If you prefer a different
    design/toolkit/API, these may be worth a look. However, if you opt for
    one of these toolkits and Python, then you are essentially starting from
    scratch with your software--it will be a complete rewrite not just in
    the programming language but also in the UI design as well. That will
    take a great deal of additional time and cost.

    To sum up: a rewrite of your software in Python will amount a
    major-to-complete overhaul of the code base, depending on how you
    approach the UI design--and this will involve significant cost and time.
    This may make sense if you feel you have reached the end of the line
    with Tcl and your desire for a different language is for reasons in
    addition to the look and feel of the UI. However, if your software and
    its code is otherwise satisfactory and you need simply to update the UI
    design, that can be done in Tcl at far less cost using the ttk widgets.

    Hope this helps,

    Kevin
    --
    Kevin Walzer
    Code by Kevin
    http://www.codebykevin.com
     
    Kevin Walzer, Mar 9, 2012
    #3
  4. Richard Boothroyd

    Mark Roseman Guest

    Hi Richard,

    I would strongly second the advice that Kevin provided: rewriting is a
    substantial step not to be taken lightly. If a mere facelift is desired,
    migrating to the more modern tools provided in recent versions of Tcl/Tk
    may well meet your needs at a fraction of the cost/effort.

    For additional information, you can point your technical people at
    http://www.tkdocs.com.

    Mark
     
    Mark Roseman, Mar 9, 2012
    #4
  5. On 2012-03-09, Kevin Walzer <> wrote:

    > Having said this, if you are seeing other issues with Tcl (lack of
    > support for certain libraries/API's, code is becoming unmanagable, etc.)
    > and you have concluded that Python is a superior choice overall, then
    > there are a number of different routes you can take:
    >
    > 1. Python's built-in GUI toolkit is a wrapper for Tk called Tkinter.
    > Recent versions of Python support the themed Tk widgets as well as the
    > classic Tk widgets. Doing a port of your code from Tcl/Tk to Python will
    > be somewhat simpler if you use Python's Tkinter library, because the
    > general layout will be similar. However, there are no automated tools
    > for mapping Tk to Tkinter that I am aware of--you will have to do a
    > rewrite of your code.


    If you _do_ decide a rewrite of your code is in order, trying to
    "convert" your existing code will mostly likey produce a mess. Python
    and Tcl are very different languages. Trying to write a Tcl program
    in Python won't work very well. The right thing to do is to carefully
    figure out what the requirements are (you should probably even write
    them down). Then sit down with a blank slate and
    design/build/grow/write a Python application.

    Evaluating and choosing a GUI framework (Tk, Wx, Gtk, Qt, etc.) can
    take quite a bit of time, so remember to allow for that. If you
    decide to skip that step and stick with Tk, then you've got a bit of
    head start since you know how Tk works (assuming the API for the newer
    themed widgets isn't too much different than the old widgets).

    --
    Grant Edwards grant.b.edwards Yow! Give them RADAR-GUIDED
    at SKEE-BALL LANES and
    gmail.com VELVEETA BURRITOS!!
     
    Grant Edwards, Mar 9, 2012
    #5
    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. Carlos P.
    Replies:
    4
    Views:
    542
    Jeff Epler
    Jul 20, 2003
  2. K_Lee
    Replies:
    18
    Views:
    604
    Alex Martelli
    Nov 13, 2003
  3. Marcel Achim
    Replies:
    2
    Views:
    460
    Ed Suominen
    Apr 9, 2004
  4. Adelein and Jeremy
    Replies:
    0
    Views:
    327
    Adelein and Jeremy
    Apr 29, 2004
  5. Mumia W.

    Inline::Tcl vs. Inline::Tcl

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

Share This Page