My question is about the easiness of distributing the GUI app across the platforms (Mac/Linux/Windows), and I want to know the one that makes the user's job easiest.
My current understanding is that Tkinter app is the easiest for the users (to install) because as long as the user has installed a Python in her box, my application should be ready to run on that box.
For GUI app written in wxPython or pyQT, the user needs to install wxWidget or QT in her box first, which is an extra step, and then install my GUI app. (But my Ubuntu box seems to have the wxWidget libraries and QT libraries installed by default, is that a norm or just Ubuntu distro is more friendly to users? I guess Windows and Mac probably does not provide them by defualt, ie. the users need to download and install them as an extra step)
wxPython has much better printing support than Tkinter. wxPython cons: wxPython requires a separate download which can be a pain to manage when you deploy your app. Documentation is very weak in my opinion; it's very hard to find specific information.
WxPython has fewer convenience functions when compared to PyQt. For instance, copy and paste functionality is built right into PyQt, while it has to be coded by hand in wxPython (and is still partially subject to the platform it runs on).
Anyhow, in most situations, the best solution is using PyQt, considering the advantages and disadvantages of both PyQt and Tkinter. GUI programming with Qt is created around signals and slots for communication amongst objects. Thus, it allows flexibility, while it gets to the programmer access to a wide array of tools.
In this article, we conclude that there is no much difference in Kivy or PyQt when speaking about working on GUI in Python, but they both are frameworks that work on different applications such Kivy is much better for mobile apps and other multi-touch apps than desktop apps, whereas PyQt is much better for desktop apps ...
If you're running Ubuntu, PyQt will be installed by default. Most linux distros will have one of PyGtk or PyQt installed by default. WxPython was most likely installed in your Ubuntu box as a dependency for some other package in your system.
If your target market is Linux, you can just create a deb or rpm package and that'll take care of the dependencies for your application.
For Windows and Mac(and even Linux if you're so inclined) you could bundle the python interpreter with your application and its libraries into a native executable format such
as .exe, .dmg or .elf using libraries like cx_freeze
, py2exe
and py2app
. Once this is done, your user will not have to install python
or any of your libraries.
Tkinter is the only one that's included with Python. wxPython and pyQT need both the wxWindows or QT libraries and the wxPython or pyQT libraries to be installed on the system.
However, Tk does not look very nice. If you're already making the user install Python, you could just as well have them install the libraries too. (Or maybe include an installer or something.)
If the app is going to be cross-platform I would suggest WxWidgets
(wxpython
). I have used it several times and it has never been a problem.
Nevertheless, you should create different installers for Windows, Mac and Linux. In Linux, use .deb
or .rpm
to take care of dependencies.
In Windows, I've always used py2exe
to create an exe
file. Py2exe
works by attaching the python interpreter and the needed libraries, in this case wxWidgets
.
Check this link for more information: http://www.py2exe.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With