
Show HN: Tkui – Python GUI maker that simulaneously edits the GUI and its editor - asrp
https://github.com/asrp/tkui/
======
josephernest
Why a post about UI, GUI makers, etc. without a single screenshot in the
github's README.md??

Please give us a mean to understand in 10 seconds what it's about, by adding a
screenshot or an animated screenshot
([http://www.cockos.com/licecap](http://www.cockos.com/licecap) is cool for
this) :)

~~~
eddiep
+1 to why no visuals? Having a GUI maker without a single still or animated
screen shot is perplexing. Can you add a couple screen shots to the GitHub
repo?

------
asrp
tkui is one of my joke side projects but it does run and serve a purpose. I
was trying to make some quick GUIs in Python for my own use but always
restarting the program when small details in the layout changes makes for a
slow workflow (closing and reopening the program).

So I wanted to use a GUI editor. I don't remember exactly but I think I didn't
find anything that suited (I know I at least looked online for a while). So I
decided to make my own, which became tkui.

Now the editor is itself a GUI so it'd be awfully helpful to have a GUI editor
to make it. Because time travel isn't an option, I started from scratch and
tried to add useful elements for create tkui itself. Of course, those elements
are also the elements of tkui. So now tkui is a tkui maker.

If anyone have suggestions for "build orders" for recreating similar programs
from scratch, I'd be interested to know.

I tried to make it so I need to restart tkui/the current project as little as
possible. I also tried to the keep the project small, although with both
dependencies, its getting larger.

~~~
rkeene2
See also vTcl ( [http://vtcl.sourceforge.net](http://vtcl.sourceforge.net) ).
As an added bonus, Tcl :-)

------
kelvin0
I use wxFormBuilder and export the GUI using XRC (instead of Python). I know
it's not exactly 'dynamic', but it's pretty close.

First I build my whole GUI project with all the widgets in wxFormBuilder, and
export the project as XRC (xml representation of the GUI widgets and
hierarchy).

Then My wxAPP (Pyhton or C++) loads the XRC and builds every widget contained
contained within my project. This is done by a simple call to
'xrc.XmlResource('mygui.xrc')'

This makes it super easy to maintain and test my GUI changes, without having
to sift through a bunch of 'AddSizer...' GUI specific code. Building a GUI in
code and maintaining it adds quite a cost and becomes quite tedious quickly.

wxFormBuilder does tend to crash once in a while, but otherwise allows for a
fairly smooth GUI building experience, while decoupling your App code from
your GUI 'scaffolding' concerns.

------
ekvintroj
Each day more close to smalltalk ;)

~~~
asrp
Indeed! Although I only recently learned of Squeak Smalltalk and variants like
Pharo and Cuis (quite a bit after tkui was close to its current state). What
GUI maker(s) do you recommend for Smalltalk?

Let me elaborate on your comment for other readers though. Smalltalk is a
programming language in which an entire (graphical and audio) environment
called Squeak was built. Smalltalk's dynamic nature and the nature of its
global namespace (for classes and their methods) means that class and methods
can be modified from within the environment at any time (and any future calls
will use the new method). This is the part that make it similar to tkui (or
perhaps rather tkui similar to Squeak).

~~~
ekvintroj
I only know spec, which is the framework that Pharo uses. You can find the
book here: [http://files.pharo.org/books/spec-
tutorial/](http://files.pharo.org/books/spec-tutorial/)

~~~
asrp
Thanks! From the first example, it looks more like a UI toolkit than a
(visual) editor though. At least it seem the layout can only be created using
code.

I remember Squeak having a tree (I forget the name) but don't remember if it
was easy to edit with it directly.

------
carapace
"idle -n" !?

(In case I am being too obscure: Run idle in "no subprocess" mode and then any
TKinter widgets your script creates partake of the IDLE editor's Tk mainloop.
You get instant dynamic GUI. Awesome for RAD.)

;-D

~~~
asrp
Interesting! I do the same with ipython. Now if only we could edit idle's own
UI while its running.

------
7ewis
I've been meaning to learn how to automate websites using Python, this seems
like a quick way to get started!

------
MattRix
Any chance of a video demo of this?

~~~
asrp
Maybe. What would you like to see in it? Sample use, detailed explanation, run
through of the guided tour, ...?

~~~
josephernest
From your point of view, everything is clear, because you are the author: you
know what you are doing, why, etc.

But for a visitor of your github like me, even if I do a lot of Python, it's
hard to understand quickly what it's about.

As I don't have 10 minutes to spend for each ShowHN, a video would be great to
understand what it's about :)

------
squarefoot
The name is a bit misleading as it recalls Tekui which is a (very nice IMO)
LUA GUI extension.
[http://tekui.neoscientists.org/screenshots.html](http://tekui.neoscientists.org/screenshots.html)

