Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21425 > unrolled thread
| Started by | Richard Boothroyd <rboothroyd8@gmail.com> |
|---|---|
| First post | 2012-03-09 07:10 -0800 |
| Last post | 2012-03-09 10:58 -0500 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
converting from tcl/tkl to python Richard Boothroyd <rboothroyd8@gmail.com> - 2012-03-09 07:10 -0800
Re: converting from tcl/tkl to python Kevin Walzer <kw@codebykevin.com> - 2012-03-09 10:59 -0500
Re: converting from tcl/tkl to python Mark Roseman <mark@markroseman.com> - 2012-03-09 13:36 -0700
Re: converting from tcl/tkl to python Grant Edwards <invalid@invalid.invalid> - 2012-03-09 20:54 +0000
Re: converting from tcl/tkl to python Rod Person <rodperson@rodperson.com> - 2012-03-09 10:58 -0500
| From | Richard Boothroyd <rboothroyd8@gmail.com> |
|---|---|
| Date | 2012-03-09 07:10 -0800 |
| Subject | converting from tcl/tkl to python |
| Message-ID | <b09e5018-466c-40f7-8748-df1e9f6340cd@gi10g2000vbb.googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Kevin Walzer <kw@codebykevin.com> |
|---|---|
| Date | 2012-03-09 10:59 -0500 |
| Message-ID | <jjd9cb$259$1@dont-email.me> |
| In reply to | #21425 |
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
[toc] | [prev] | [next] | [standalone]
| From | Mark Roseman <mark@markroseman.com> |
|---|---|
| Date | 2012-03-09 13:36 -0700 |
| Message-ID | <mark-CED789.13360109032012@news.eternal-september.org> |
| In reply to | #21426 |
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
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2012-03-09 20:54 +0000 |
| Message-ID | <jjdqmn$q5k$1@reader1.panix.com> |
| In reply to | #21426 |
On 2012-03-09, Kevin Walzer <kw@codebykevin.com> 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!!
[toc] | [prev] | [next] | [standalone]
| From | Rod Person <rodperson@rodperson.com> |
|---|---|
| Date | 2012-03-09 10:58 -0500 |
| Message-ID | <mailman.535.1331309147.3037.python-list@python.org> |
| In reply to | #21425 |
On Fri, 9 Mar 2012 07:10:19 -0800 (PST) Richard Boothroyd <rboothroyd8@gmail.com> 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 rodperson@rodperson.com 'Silence is a fence around wisdom'
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web