Discussion:
[Tkinter-discuss] General Tkinter Assistance Module
Lion Kimbro
2012-02-21 01:22:54 UTC
Permalink
Has anybody written a general tkinter assistance module?

I'm thinking of a module that:

* supplies functions/tools to examine the widget hierarchy from the shell
* pretty print information about widgets
* wraps event binding and implements a multiplexer, to work around the
widget.unbind(funcid=...) bug,
* wraps idle binding and .after scheduling, so that you can review
bindings (like a task manager), see what's going on, pause/continue
(control) idle executions
* setup Tk & withdraw in 1 call
* return the full path for a widget
* standardize access to the text content of Text, Entry, etc.,.
* ...
* ... (and anything else that makes life with tkinter generally easier)

Has anyone created such a thing?

If no one has created one, is there a good reason for that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120220/ffe7d754/attachment.html>
python
2012-02-21 13:32:04 UTC
Permalink
Hi Lion,

I've thought about what you've proposed many times (a Tkinter
framework), but have never had the time to implement it.

I think all your suggestions are on target.

Malcolm

<snipped>
I'm thinking of a module that:
* supplies functions/tools to examine the widget hierarchy from
the shell
* pretty print information about widgets
* wraps event binding and implements a multiplexer, to work
around the widget.unbind(funcid=...) bug,
* wraps idle binding and .after scheduling, so that you can
review bindings (like a task manager), see what's going on,
pause/continue (control) idle executions
* setup Tk & withdraw in 1 call
* return the full path for a widget
* standardize access to the text content of Text, Entry, etc.,.
* ...
* ... (and anything else that makes life with tkinter generally
easier)

Has anyone created such a thing?
If no one has created one, is there a good reason for that?
</snipped>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120221/b4f3e912/attachment.html>
Lion Kimbro
2012-02-21 19:59:42 UTC
Permalink
Well, I want to take this on.

I've already implemented many of these functions, but they are not neatly
implemented, and tied into my personal code at the moment. A spec should
help clean things up.

I'll create a Google Doc to collaboratively sketch out aims, an API, put
together requirements, and a basic plan for a team and soliciting
participation. I'll curate from discussions and what I can find.

Is anyone else interested?

I'm looking broadly for things like:
* specific functions that you think would be valuable
* advice on who to talk with
* any advice, generally
* people who'd be willing to review the sketch API
* ...

I'm broadly looking for supporters, users, advisers, etc.,.
Post by python
Hi Lion,
I've thought about what you've proposed many times (a Tkinter framework),
but have never had the time to implement it.
I think all your suggestions are on target.
Malcolm
<snipped>
* supplies functions/tools to examine the widget hierarchy from the shell
* pretty print information about widgets
* wraps event binding and implements a multiplexer, to work around the
widget.unbind(funcid=...) bug,
* wraps idle binding and .after scheduling, so that you can review
bindings (like a task manager), see what's going on, pause/continue
(control) idle executions
* setup Tk & withdraw in 1 call
* return the full path for a widget
* standardize access to the text content of Text, Entry, etc.,.
* ...
* ... (and anything else that makes life with tkinter generally easier)
Has anyone created such a thing?
If no one has created one, is there a good reason for that?
</snipped>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120221/277144a2/attachment.html>
python
2012-03-11 21:10:05 UTC
Permalink
Hi Lion,

Read your spec on google-docs [1], saw my name mentioned as a
slacker<g>, and felt obligated to contribute to the discussion.
Post by Lion Kimbro
specific functions that you think would be valuable
Here's what I've been frustrated trying to create with
Tkinter/ttk:

Framework level enhancements
- simple jquery-like smooth animation effects for moving widgets
into position
- a diagnostic tool like wxPython's WIT (widget inspector tool)
[2]
- ellipsis generator for "Text is too long to ..."
Widget specific
- jquery-like collapsible containers with smoothly animated
collapse/expansion
- simpler interface for creating scrollable frames
- a simpler interface for creating color coded markup rules for
Text controls
- modern looking, ttk based, locale-aware, calendar/datepicker
- masked input Entry widgets
- locale-aware (numeric, date, time) Entry widgets
- an autocomplete Entry widget
- listbox that allows drag-and-drop repositioning of rows
- ttk tree/grid control that allows drag-and-drop repositioning
of nodes/cells/rows
- a property-editor like widget

Malcolm

[1]
https://docs.google.com/a/intricity.com/document/d/1TCANkeaBYs_W7
Sg9J1ce8Y1X4G6UR1PT3H-iMIuuNFY/edit?pli=1
[2] http://wiki.wxpython.org/Widget%20Inspection%20Tool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120311/3709da80/attachment.html>
Lion Kimbro
2012-03-14 19:27:48 UTC
Permalink
Heh heh heh ;)

Right now, everything is on the table. If several people perceive a need
where I do not, I am happy to move along with the several people. I also
have ideas though.

Here's my rankings of what you wrote, on a four star basis:

inspection (****):
- a diagnostic tool like wxPython's WIT (widget inspector tool) [2]

support (***):
- ellipsis generator for "Text is too long to ..."
- simpler interface for creating scrollable frames
- a simpler interface for creating color coded markup rules for Text
controls

widgets (**):
- masked input Entry widgets
- modern looking, ttk based, locale-aware, calendar/datepicker
- locale-aware (numeric, date, time) Entry widgets
- an autocomplete Entry widget
- listbox that allows drag-and-drop repositioning of rows
- ttk tree/grid control that allows drag-and-drop repositioning of
nodes/cells/rows
- a property-editor like widget

animation (*):
- simple jquery-like smooth animation effects for moving widgets into
position
- jquery-like collapsible containers with smoothly animated
collapse/expansion

(I'm not even sure that the animation effects are *possible,* without
using "place" primarily, or otherwise seriously overhauling the layout
system. Wouldn't those be more appropriate to their own module --
"tkanimate" perhaps?)

I see this module as primarily a support system for people who are
working with the tkinter system, rather than as a widget library. (Of
which, ... Aren't there several widget libraries out there already?
Though I am not familiar with what their capabilities are.)

So for example, things like inspection tools, (to see: "What's already in
the system?"), variable retrieval tools (I have a function "svar" which
gives a StringVar given a widget that makes use of 1 or 2 X-Vars,)
workaround to the .bind/.unbind bug.

I must confess -- I have a lot of radical tkinter ideas. For example, I
have in my collection of projects implemented an ASCII->tkinter renderer.
You draw an ASCII image of the tkinter GUI that you want, with
"(button-label)" for buttons, "[] check-label" for checkboxes, drawings of
canvas and image frames with "+-----+" type ascii boxes and on and on. It
works. And I've written microlanguages for scripting Canvas drawing, and
for binding events to functions, and scripting complex interaction
sequences. Alternative and compact notations for widget creation. But
these ideas are all too radical for tkhelp. For tkhelp, I want to focus on
the basics: I can look at widgets, I can bind and unbind, I can find
widgets in the hierarchy by name, etc., etc.,. (For more radical ideas:
Another module, later, maybe.)

If there isn't already a module of widgets, though, there really should
be one. I'd be happy to curate "tkwidgets" (or something similar.) But I
was under the impression that something like that already exists? In fact,
several somethings like that? "PMW" mega-widgets comes to mind. Aren't
there at least one or two others?

As for the ellipses, and support for scrolling frames creation -- I think
that should go into tkhelp. Because they are so common, because they
aren't widgets, because it can be tricky, but isn't too tricky in the
common case. Small useful things are great, and I'd like them in tkhelp.

What do you think? And if I'm wrong about something, or am missing
something obvious or important, please let me know.
Post by python
Hi Lion,
Read your spec on google-docs [1], saw my name mentioned as a slacker<g>,
and felt obligated to contribute to the discussion.
Post by Lion Kimbro
specific functions that you think would be valuable
Framework level enhancements
- simple jquery-like smooth animation effects for moving widgets into
position
- a diagnostic tool like wxPython's WIT (widget inspector tool) [2]
- ellipsis generator for "Text is too long to ..."
Widget specific
- jquery-like collapsible containers with smoothly animated
collapse/expansion
- simpler interface for creating scrollable frames
- a simpler interface for creating color coded markup rules for Text
controls
- modern looking, ttk based, locale-aware, calendar/datepicker
- masked input Entry widgets
- locale-aware (numeric, date, time) Entry widgets
- an autocomplete Entry widget
- listbox that allows drag-and-drop repositioning of rows
- ttk tree/grid control that allows drag-and-drop repositioning of
nodes/cells/rows
- a property-editor like widget
Malcolm
[1]
https://docs.google.com/a/intricity.com/document/d/1TCANkeaBYs_W7Sg9J1ce8Y1X4G6UR1PT3H-iMIuuNFY/edit?pli=1
[2] http://wiki.wxpython.org/Widget%20Inspection%20Tool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120314/b48ff80c/attachment.html>
Loading...