This project appears to be quite early stage (many missing APIs, no stable Windows support, poor documentation, etc) but very promising. If it had integration with a GUI designer and was feature complete, I'd start using it on projects.<p>I've explored the options for Python GUI toolkits quite extensively. They're a real challenge to get running conveniently (by conveniently, I mean a simple PIP install away with no external C/C++ library dependencies) on OS X with native looks, and that is a nice advantage of this one IMHO.
Another toolkit that uses Python, but with Qt (and previously also wxWidgets) is enaml - it has a cassowary solver, a Visual Studio docking system, and very interesting approach to connecting that to visual elements.<p><a href="https://github.com/nucleic/enaml" rel="nofollow">https://github.com/nucleic/enaml</a><p><a href="http://nucleic.github.io/enaml/docs/" rel="nofollow">http://nucleic.github.io/enaml/docs/</a>
For a project like this where there are many other potential options (wxPython etc.) the first question I'm thinking is 'why do I care about this new one'. I.e. What does this do better/differently/more conveniently.
I assume the answer here us the native Python aspect and not needing big compiled libraries. Might be worth selling it a bit more on your homepage and making that advantage clearer?<p>It may be that everyone else picked up on Python native quicker than I did, I'm reading this in bed during a lie in so am a bit sleepy!
This looks promising. It would be better if the documentation was a bit more exhaustive[0]<p>[0]<a href="http://toga.readthedocs.org/en/latest/internals/platforms/desktop/cocoa.html" rel="nofollow">http://toga.readthedocs.org/en/latest/internals/platforms/de...</a>.
I was really confused when I read "the constrain() call takes <i>expressions</i> that define the relationships you want to impose" (emphasis mine) and saw this code:<p><pre><code> container.constrain(button.TOP == container.TOP + 50)
</code></pre>
Python doesn't let you pass expressions! Why isn't that just getting evaluated to true or false? Is this not vanilla Python? Is there a pre-processor?<p>I dove into the code and found the answer here[1]. button.TOP and container.TOP are both Toga Attributes, which have their equality operators redefined.<p>Very interesting and clever use of operator overloading.<p>[1] <a href="https://github.com/pybee/toga/blob/master/toga/constraint.py" rel="nofollow">https://github.com/pybee/toga/blob/master/toga/constraint.py</a>
<p><pre><code> left_container = toga.OptionContainer()
AttributeError: 'module' object has no attribute 'OptionContainer'
</code></pre>
Frustrating when things that are supposed to work out of the box, don't. Initial search yields no help.
Very interesting. They have other tools which are rather useful looking as well: <a href="http://pybee.org/" rel="nofollow">http://pybee.org/</a> (debugger, test runner, coverage visualiser etc)
Does anyone know of any similar GUI toolkits, for languages other than Python? That is, cross-platform GUI toolkits that use true OS-native widgets, and ideally, also abstract away platform-specific details such as the placement of the Quit/Exit menu items and the order of OK/Cancel buttons. Toga is actually the first library with those features that I’ve heard of.
The use of constraints to let the user specify where to put things but still allow enough flexibility to do OS-dependant things is interesting (and possibly novel?):<p><a href="http://toga.readthedocs.org/en/latest/introduction/tutorial-0.html" rel="nofollow">http://toga.readthedocs.org/en/latest/introduction/tutorial-...</a>
loutish/lazy Debian/"testing" system here:<p><pre><code> ~> apt-cache search toga
toga2 - computer chess engine, calculates chess moves
</code></pre>
(hm... wake me when it hits testing)