4 ms·
It has the advantage of being simple. As other commenters have pointed out, there's not really a good, simple, modern, cross-platform GUI library with Python b
by sevensor 11y ago
It has the advantage of being simple. As other commenters have pointed out, there's not really a good, simple, modern, cross-platform GUI library with Python bindings. As you can observe from how slick Jupyter is getting in comparison, we've almost given up on improving native GUI toolkits in favor of using the browser. At least Tk doesn't force you to use the Motif widgets any more!
- jlarocco 11y agoAre you forgetting about PyQt and PySide? If they don't meet the requirements for "good, simple, modern, cross-platform GUI library," then I'm hard pressed to think of a library or binding for any language that will. I guess I could see a sticking point on "simple" but IMO it's significantly easier to create a GUI using PyQt than it would be to mess with web servers and HTML to create a web based UI.
- sevensor 11y agoExactly the opposite --- I work with Qt in Python, and I've used both PyQt and PySide. I assure you it's not simple. Not that that's bad. It's a flexible and powerful tool. But using it doesn't feel like Python. It feels like C++ with Python syntax. No surprise, since Qt is written in C++. You've got a point in that web-based UIs aren't any simpler. Jupyter is a project of impressive sophistication and hard work by all involved. Really what I'm complaining about is that the move toward web-based UI has starved native GUI toolkits of interest.
- jlarocco 11y ago> I assure you it's not simple. I have to disagree. I've written GUIs in Qt/C++, PyQt, MFC (a long time ago), Perl/Tk, and even ltk/Common Lisp, and PyQt is the easiest of them all. There's definitely some C++ showing through in spots, but it's well hidden in most situations. > Really what I'm complaining about is that the move toward web-based UI has starved native GUI toolkits of interest. I have to agree with that. Most languages are lucky to have any native GUI toolkit bindings at all.
- witty_username 11y agoIMO PyQt is pretty much like Python; the C++ parts show up in places but otherwise it's WAY simpler than Tk's complexity to do even basic stuff and horrible themeing on Linux. I used Tk a bit once; the Tcl parts show up quite a bit and it's generally very hard to use compared to Qt Designer or any other modern toolkit's tools.