converting from tcl/tkl to python

  • Thread starter Richard Boothroyd
  • Start date
R

Richard Boothroyd

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
 
R

Rod Person

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.
 
K

Kevin Walzer

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
 
M

Mark Roseman

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
 
G

Grant Edwards

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).
 

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,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top