Live data from Hacker News

Toga: A Python native, OS native GUI toolkit

pybee.org

21–30 of 72 posts

Re: Toga: A Python native, OS native GUI toolkit

#21
post #13

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. https://github.com/nucleic/enaml http://nucleic.github.io/enaml/docs/

Having developed several advanced apps in enaml over last 2 years, i commend enaml. It encourages MVC and provides clean observer-style bindings (Atom).

The framework is used internally by at least one fortune 50 corp for a large app suite.

Re: Toga: A Python native, OS native GUI toolkit

#22

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 most famous such library is wxWidgets; it supports "Python, Perl, Ruby, and many other languages":

http://www.wxwidgets.org

Re: Toga: A Python native, OS native GUI toolkit

#24
post #15

The Mac screenshot I see on the home page looks about as non-native as the average Qt app.

That's a matter of design, not an observation based on technical merits.

Maybe I'm missing something, but isn't the main 'hook' for this library that it looks native? Looks like it uses GTK+, so from a technical standpoint it would be as "native" as Qt.

Re: Toga: A Python native, OS native GUI toolkit

#25

Earlier quoted context omitted.

That's a matter of design, not an observation based on technical merits.

Maybe I'm missing something, but isn't the main 'hook' for this library that it looks native? Looks like it uses GTK+, so from a technical standpoint it would be as "native" as Qt.

It does not use GTK+ on a Mac, it uses Cocoa, so it is fully native. Read the docs.

Re: Toga: A Python native, OS native GUI toolkit

#27

Earlier quoted context omitted.

Maybe I'm missing something, but isn't the main 'hook' for this library that it looks native? Looks like it uses GTK+, so from a technical standpoint it would be as "native" as Qt.

It does not use GTK+ on a Mac, it uses Cocoa, so it is fully native. Read the docs.

Hmm, they should update their front page than. It is pretty clear in stating "Toga uses the system native python GTK+3 bindings for display purposes."

Re: Toga: A Python native, OS native GUI toolkit

#29
post #27

Earlier quoted context omitted.

It does not use GTK+ on a Mac, it uses Cocoa, so it is fully native. Read the docs.

Hmm, they should update their front page than. It is pretty clear in stating "Toga uses the system native python GTK+3 bindings for display purposes."

That sentence you quote is immediately underneath the heading "Problems using virtualenv under Ubuntu" — it applies only to Ubuntu, where they do use GTK. But on Mac, they use Cocoa, as stated in several places in the docs.

Re: Toga: A Python native, OS native GUI toolkit

#30
post #15

The Mac screenshot I see on the home page looks about as non-native as the average Qt app.

It's using native Cocoa controls, so I'm not sure why you don't think it looks native.

Because the layout that's presented is not native. Actual mac apps don't have tabs and toolbars pushed together like that, and the margins are different.

wxWidgets can use the platform native controls, but the apps rarely look native because the layouts and behaviors are non-native. Mac/GNOME/Windows all have different ideal metrics for spacings, control placement and labeling (OK/Cancel vs Cancel/"Do Thing") -- being native means getting all of those details correct.

Post reply on HN