[Tkinter-discuss] PataPata as a Tkinter-based GUI designer
Paul D. Fernhout
pdfernhout at kurtz-fernhout.com
Thu Jul 6 16:12:02 CEST 2006
Version 0.2.02 of PataPata has just been released on SourceForge.
PataPata is an experiment about making a live Python object environment of
Prototypes and Morphs. It is intended mainly to support building
educational simulations and other microworlds for informal
"constructivist" education and "unschooling". It has previously been
discussed on the edusig list, but perhaps some people here might also find
it of interest for the Tkinter-related aspects.
The primary GUI interface is currently written in TK/Tkinter, and supports
interactively building TK-related projects (though only ones under the GPL
for now). My focus on Tkinter at this point is mainly for easy
installability, although the value of the TK library has been growing on
me as I use it more.
Almost two years ago, Eric Brunel posted this comment on Tkinter GUI building:
http://www.codecomments.com/archive284-2004-10-305528.html
and I think the PataPata approach might potentially address the issues he
raises there on the need for better Tkinter GUI designer which can support
a wide range of widgets for multiple TK-related libraries.
Basically, as part of a larger effort to bring some of the more dynamic
qualities of Self and Squeak to Python, PataPata brings "prototypes" with
"properties" (beyond the Python properties) to Python programming. This
makes it easier to wrap arbitrary GUI components, whether existing Tkinter
widgets, adding pure TCL/TK widgets (an example for that is included in
the latest 0.2.02 for a combobox and tablelist), or, theoretically (as I
haven't tried it yet), addign widgets from PMW, Tix, BWidgets, and so on.
Or, in theory, and not at the same time as using TK widgets, even widgets
from WX, GTK, or whatever could be wrapped. PataPata had an earlier and
simpler WX GUI which has not been kept up-to-date, but used the same
wrapping approach, providing some hopes for cross-platform GUIs. I know
there are many efforts related to that kind of support already (AnyGUI,
PyUI, etc.), of course, though I think they come at it from a different
perspective, and their widgets could also in theory be wrapped in PataPata
as well. Another included example wraps an "xturtle" widget (an advanced
version of a 2D turtle by Gregor Lingl as a sophisticated library using
Tkinter).
There is still no way around doing some hand-coding wrapping work for each
widget, but PataPata provides at least a framework for doing that work and
for being able to get started with it easily to do some simple wrapping of
a widget, and then add more wrapping as more functionality is needed.
There is limited PythonCard compatibility as well, as I chose to use
PythonCard naming conventions for access to many features of the Tkinter
widgets. This limited compatibility may make it somewhat easier to port
some simple PythonCard applications to Tkinter, though it still takes a
bunch of work (one example of doing this for the PythonCard sample
"conversions" is included) and many PythonCard widgets are not yet
supported. But you can at least take a PythonCard resource file and
convert it to PataPata if all the widgets types used are supported, as a
start to then doing hand coding for the rest of the functionality (which
is a tribute to PythonCard's modular design).
Now there may well be other approaches to the issues Eric Brunel brought
up, so this isn't to say PataPata is intended primarily to solve these
issues, just that in addition to its main purpose of bringing to Python
the notion of Prototypes and Morphs (that Squeak and Self have to varying
degrees), PataPata also provides an approach to handling those other
issues, which may be of interest to Tkinter users.
Here is the project web site:
http://sourceforge.net/projects/patapata/
Screenshots:
http://sourceforge.net/project/screenshots.php?group_id=165910
A homepage with links to more information (including screencasts by
Francois Schnell):
http://patapata.sourceforge.net/
I had to resolve a few tricky Tkinter-related issues in the process, and
the archives of this list were very useful, thanks. :-)
Anyway, PataPata is still very much an experiment and work in progress, so
this isn't intended to convince you to move all your Tkinter work in it,
just to mention it as something being played with at the moment. There
remain lots of things to do for it and lots of ways it can be improved
(and probably some bugs too, of course. :-)
--Paul Fernhout
More information about the Tkinter-discuss
mailing list