Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating GUI with Python in Linux

Quick question.

I'm using Linux and I want to try making a GUI with Python. I've heard about something like Qt, GTK+ and PyGTK but I don't know what they are exactly and what the difference between them is.

Is there any difference on how they work with different DEs like GNOME, KDE, XFCE etc.? Is there any IDE that allows you to create GUI like Microsoft Visual Studio does (for C#, C, Visual Basic etc.)?

Or should I maybe use another language other than Python to make GUI applications?

like image 686
Iceland_jack Avatar asked Aug 31 '09 05:08

Iceland_jack


2 Answers

Your first step should be http://wiki.python.org/moin/GuiProgramming

Some tool-kits integrate better in one environment over the other. For example PyQt, PyKDE (and the brand new PySide) will play nicer in a KDE environment, while the GTK versions (including the WX-widgets) will blend better into a GNOME/XFCE desktops.

You should look at the environment you want to target. You can go for basic portable GUI kit, or you can to a deeper integration with tour DE, like use of integrated password manager, and configuration file parsers, that are integrated in a specific DE like KDE or GNOME.

You should also consider the dependency that your selection dictates, and what is come by default with a basic DE. For example, PyKDE in the KDE 3.X branch had a non trivial set of dependencies, while at the 4.X branch the plasma binding made the Python GUI programming dependency less of an issue.

There are several IDE tools, in different levels of completeness and maturity. The best thing is to try one ore more, and see what best fit your needs.

like image 63
Chen Levy Avatar answered Sep 24 '22 06:09

Chen Levy


I would avoid using another language to make a GUI for Python.

I've had every good luck with wxwidgets, which is the python binding for WX, a cross-platform development system. It's pretty easy to learn and quite powerful. The problem with wxwidgets is that it is not installed by default, so your users will need to install it on every platform that they wish to run your application. Find more information about it at http://wxwidgets.org/.

If you want people to be able to use your program without installing anything else, use Tkinter, the GUI system that comes with Python.

I would avoid the Python bindings for GTK or KDE unless you already know those systems. They also need to be downloaded, and they do not seem to have as much adoption as wxwidgets.

like image 36
vy32 Avatar answered Sep 26 '22 06:09

vy32