4 ms·
What would you recommend to someone who wants to write Python desktop applications today? I've used wxWindows way back when, and I'd hate to use Electron. Would
by StavrosK 9y ago
What would you recommend to someone who wants to write Python desktop applications today? I've used wxWindows way back when, and I'd hate to use Electron. Would you go with Qt for Python, or PyQT?
Also, what's PySide/PySide2?
- traverseda 9y agoNot OP, I've been very impressed with some enlightenment apps written using python. In particular: https://github.com/DaveMDS/egitu https://github.com/DaveMDS/egitu https://phab.enlightenment.org/w/projects/python_bindings_for_efl/ https://phab.enlightenment.org/w/projects/python_bindings_fo... Scroll down to "python projects using EFL".
- StavrosK 9y agoThank you, that looks very interesting. I'm not sure if it's cross-platform, but I'll play with it a bit and see.
- loeg 9y agoI wouldn't use enlightenment/EFL for a new project today. If you've got the opportunity to greenfield, Qt is a much nicer framework. EFL has a number of questionable design choices, covered a little bit here: https://what.thedailywtf.com/topic/15001/enlightened https://what.thedailywtf.com/topic/15001/enlightened .
- ttflee 9y agoI feel so grateful that my first GUI toolkit is Cocoa touch which is mature in design. At least the typing just works and object ownership is well defined.
- fernly 9y agoI had not heard of enlightenment, so took a peek but as far as I could make out from the docs, it is linux/unix project? I saw nothing about MacOS or Windows... did I miss it? [Py]Qt of course is cross-platform with the local look/feel.
- paulie_a 9y agoWxwindows was a dream to work with. Electron needs to die a fiery death. preferably the corpse is then mauled by bears and tigers
- kbumsik 9y agoAs you can see, Qt for Python is not yet stable release. So you will want to use PyQt5 first. I remcommand PyQt5 because there are more resouces available on the internet now. PyQt5 and Qt for Python is a 1-to-1 binding to the original Qt and their APIs are almost identical, so you should be able to switch to Qt for Python quite easily when it is stable. By the way, Qt for Python is re-branded from PySide2. They are the same.
- StavrosK 9y agoThat's very helpful, thank you!
- fernly 9y agoWould it be as simple as a global change of all "from PyQt5" to "from PySide" in all import statements?
- kbumsik 9y agoAlmost, when switching from PyQt4 to PySide 1. It was roughly equivalent with some minor differences. It was much less work than switching Python 2.7 syntax to 3. There are some bindings as well [1]. I don't know much detail about PyQt5 vs PySide 2 but at least the overall logic should be the same. [1]: https://github.com/epage/PythonUtils/blob/master/util/qt_compat.py https://github.com/epage/PythonUtils/blob/master/util/qt_com...
- ffredrikk 9y agoPySide2 (Qt for Python) has been in production where I work (and in the visual effects industry) since 2016. Since then, bugs have been smashed, modules have been added and improvements have been made. I would recommend almost anyone to start developing with this right away and, like always, report bugs [0] and contribute improvements back to the project [1] (not on github). [0]: https://bugreports.qt.io/projects/PYSIDE/issues https://bugreports.qt.io/projects/PYSIDE/issues [1]: http://code.qt.io/cgit/pyside/pyside-setup.git/ http://code.qt.io/cgit/pyside/pyside-setup.git/
- figgis 9y agoPySide is Qt4. PySide2 is Qt5. I would suggest using PySide2 but using https://github.com/mottosso/Qt.py https://github.com/mottosso/Qt.py in case you need to switch to PyQt5 for any reason.
- pen2l 9y agoTkinter, it comes packed with python and is actually really good and really fast. In fact, when I tried variations of Qt for py, I just quit out of frustration with how things either didn’t work or didn’t work very fast, now I just stick with Tkinter.
- mwcampbell 9y agoUnfortunately, Tk isn't accessible with screen readers (for blind people) or other assistive technologies, at least on Windows. Of course, if you're just developing utilities for yourself, that's fine. Otherwise, I'd recommend wxWidgets or Qt instead.
- siddhant 9y agoDo you know of good tutorials on ttk? I keep on reading that the look and feel provided by ttk is much more native than tk, but I can hardly find a good relevant tutorial.
- markroseman 9y agoCheck out tkdocs.com
- rtpg 9y agowxPython is a thing that exists, and I believe it has a similar mental model to wxWidgets. To be honest most of the QT solutions for Python are pretty fidgety . The recent wxPython releases (4.x) work out of the box direct from PyPI, not too much to worry about licensing. For Qt, it's... the licensing is usually just fine for people but it's complex enough to where things like maintaining your own fork (pretty easy in Python compared to C++) is not super easy. But there's decent Python support, so it's more "do you want to use Qt or wx". Both systems have good enough support.
- antnisp 9y agoIsn't the licensing LGPL3? How is this confusing?
- mattip 9y agoHow do I provide end users the ability to swap out LGPL3 shared objects (as required by the license) on an embedded platform with no access, or inside a py2exe bundle?
- pjmlp 9y agoQt license is pretty ok, it is just complicated for the typical crowd that wants to sell stuff built with free (beer) tools.
- rtpg 9y agoI guess the proper rephrasing is that it doesn't match the licensing terms of most projects in the Python world. It's most definitely not the most complicated thing, but when your processes are based off of BSD'd libraries, you gotta think a bit harder about Qt usage, if only for it falling outside the normal scope of things.
- cpburns2009 9y agoOne thing to keep in mind is licensing. PyQt is GPL and commercial licensed. PySide is LGPL.