3 ms·
Barely related but Tk/Ttk (in particular tkinter[1]) is criminally underrated for GUI tools. There's a fairly solid cross-platform GUI toolkit right there in th
by formerly_proven 4y ago
Barely related but Tk/Ttk (in particular tkinter[1]) is criminally underrated for GUI tools. There's a fairly solid cross-platform GUI toolkit right there in the Python standard library and it's even native on Win32 and macOS (meanwhile there are e.g. bootstrap-like skins for it in case you don't like the Motif-look on Linux). There's really no need for every small Python GUI tool/script to require PyQt/PySide/wxPython and the non-wheel packaging shenanigans that go with that.
[1] tkinter is actually a bi-directional Tcl <-> Python binding under the hood, all the binding code on the Python side is just classes and every method is just a thin wrapper around calling into Tcl.
- kristofferg 4y agoAgree. ime. Tk/Ttk tkinter is sufficient for 99% of cases and the syntax is as simple as possible. Its stable, mostly backward compatible and fast. Also a breeze to maintain.
- BiteCode_dev 4y agoPyQt and wxPython have wheels now. Although, I'm guessing now that Python and Rust are becoming BFF, https://tauri.app/ https://tauri.app/ will become a more and more attractive option.
- formerly_proven 4y agoI haven't checked for PyQt/PySide but the Linux wheels are more-or-less distro-specific, they're not manylinux wheels. I don't think a compliant manylinux wheel (i.e. one that includes all libraries beyond those of the manylinux2014 reference platform) is even desirable, because gtk doesn't really like being shipped with applications, it wants to load plugins and themes from the system etc. Qt is similar - a Qt app that ships its own version of Qt will always have issues fitting in with the system Qt LAF. It of course depends on what the target is, exactly. If you don't care about looking "native", for whatever little meaning that has had for the past decade, you can just use whatever theme you fancy with Ttk. The theming engine might not be as powerful as Qt's, but it's certainly good enough for emulating a modern flat-look UI: https://github.com/israel-dryer/ttkbootstrap https://github.com/israel-dryer/ttkbootstrap Some people would even find some of the built-in ones perfectly satisfying, I even know some people who love the classic Tk look (https://wiki.tcl-lang.org/page/List+of+ttk+Themes https://wiki.tcl-lang.org/page/List+of+ttk+Themes)
- ptx 4y ago> it's even native on Win32 and macOS It uses the native theming APIs to draw the widgets in a mostly native-looking style, but (unlike e.g. wxWidgets) it doesn't use native widgets, so it doesn't behave quite like native applications. But I agree that it's pretty neat. And the default theme on Linux has been updated and now looks more like some old-school GTK themes (which I like) than Motif.