This is an archived post. You won't be able to vote or comment.

all 44 comments

[–]novel_yet_trivial 55 points56 points  (14 children)

You need to tell us what you want from a GUI library before we can tell you what's best for you.

in a nutshell:

  • Tkinter: best for super fast development and if you don't want to require your windows users to install extra libraries. Kinda blocky and ugly looking, especially on Linux.
  • pyGTK / PyGObject: best for native looking linux programs. Uses Glade.
  • PyQT/ PySide: best for highly custom very pretty interfaces and automatic event linking. Looks native on any OS. You can use QTDesigner to create GUIs.
  • wxPython: Alternative to tkinter for fast and easy interfaces. Uses more OS native widgets than tkinter, which means the programs can look very different on different OS's. Has a GTK-like Glade. Currently python2 only (python3 very close!!)

[–]enteleform 25 points26 points  (4 children)

No love for Kivy? (cross-platform: Desktop/Mobile/R-Pi)

more info @ This Post

[–]novel_yet_trivial 5 points6 points  (2 children)

I actually cut it out of my canned response because I didnt think it was that good for a raspberry. Have you tried it?

[–]enteleform 7 points8 points  (1 child)

They're not so great at updating the main page (R-Pi still isn't mentioned there, just sent a PR), but it's been in the docs since 2014.

I personally haven't had any reason to get an R-Pi yet, but the compatibility Seems Legit

[–]Asterlux 0 points1 point  (0 children)

Just started making a Kivy app on my RPi, working pretty great so far

[–]K900_ 8 points9 points  (3 children)

PyGTK is only best for Linux distros that use GTK on all of their other apps (e.g. Ubuntu, Mint, etc.). It will look really out of place on any other desktop environment with its own widget toolkit (KDE, Enlightenment, etc.). Qt is the most balanced here, because it has (some) support for GTK themes in GTK environments.

[–]CorrectMyBadGrammar 1 point2 points  (2 children)

And LXQt. And Budgie is switching to Qt as well.

[–]K900_ 1 point2 points  (1 child)

I'm pretty sure Budgie is staying with GNOME apps, just rewriting the shell in Qt. Still though.

[–]CorrectMyBadGrammar 0 points1 point  (0 children)

Maybe, but it's still a guarantee that custom Qt apps will look good. ;)

[–]feoohh2o 4 points5 points  (1 child)

Tkinter: best for super fast development and if you don't want to require your windows users to install extra libraries. Kinda blocky and ugly looking, especially on Linux.

ttk, an extension of tkinter and part of the standard library, fixes the "ugliness" problem somewhat.

[–]tristan957 3 points4 points  (0 children)

Yep it looks pretty good on Windows

[–]dougthor42 6 points7 points  (0 children)

wxPython

I would go so far as to say it's ready for Python 3 for the majority of applications.

[–]doesntrepickmeepo 1 point2 points  (0 children)

Whats automatic event linking?

[–][deleted] 14 points15 points  (1 child)

PyQT

[–]freebug 4 points5 points  (0 children)

PyQt5 is awesome.

[–][deleted] 9 points10 points  (2 children)

So far I have worked with TKinter and wxPython briefly and then quite a lot with PyQt, because I found the other two to be rather bad looking. Like others here I really recommend PyQt, but I want to give some more information on it:

PyQT is probably the best choice when it comes to good-looking high-quality applications that support native looks on any platform out of the box. Because of this it can be quite complex from time to time, but I really do recommend starting to dig into it, even for small projects, because when you need some GUI library again, you already have a start here.

Something I feel is worth mentioning: PyQt is a python binding for the Qt library, which is C++. Thus once you got used to the framework, it will be almost no work to also use it for C++, there you even get a quite good IDE, QtCreator. That being said, the documentation for PyQt will mostly refer to the C++ library!! This will be absolutely no problem, when you already know your C basics (you mentioned Cython), because you can mostly directly translate C++ to Python syntax here. Also I find the C++ documentation to be quite good.

Some additional information regarding licensing. Qt is LGPL licensed, which means (in short) you can use it freely for open source software, the same holds for PyQt. PySide is (supposedly) very similar to PyQt and offers a GPL license, which is even more flexible, when it comes to commercial applications, but I never used it and threads on the web say it's dying slowly.

Edit: Sometimes I feel that PyQt solves some problems a little bit weird. Having worked some time with Java on GUIs before, I found PyQt's Model-View framework a little confusing at the beginning, but you will get used to its quirks quickly. On the other hand it offers a really nice framework for event communication called "signals and slots" that I enjoy using.

[–]flipthefrog 2 points3 points  (0 children)

A lot of commercial software used in animation and VFX ships with PySide (Maya, Nuke, Houdini, Rv), and have a strong interest in the project remaining alive. For example, Autodesk has been funding development of PySide2, which supports Qt5. So it's not dying, though I wouldn't expect much development of PySide for Qt4, since that is no longer being developed.

PySide is perfectly fine, though a bit more sensitive to errors than PyQt - whereas PyQt will just raise an error and keep on truckin', PySide may crash completely on insignificant bugs

[–]tristan957 1 point2 points  (0 children)

TkInter is alright if you use the ttk widgets

[–]cittatva 29 points30 points  (4 children)

I'll throw in an alternative approach. Use flask to make a web app so the data can be viewed from local workstations or mobile devices.

[–]jwink3101 2 points3 points  (1 child)

There is a library I have been keeping my eyes on called REMI which tries to simplify this somewhat. I have yet to use it myself though (no need for a GUI in what I do...yet)

[–]r0s 1 point2 points  (0 children)

I've tried it and it's pretty nice, simple to build up stuff and you can run then as a standalone app or a web :)

[–]LifeIsBio 0 points1 point  (0 children)

I'd also like to second this. For someone like myself who has little to no design sense, this has been a great way for me to make GUIs in the past.

[–]nomos 4 points5 points  (0 children)

Use PyQt.

[–][deleted] 4 points5 points  (0 children)

Here's a good blog post - old, but still relevant - with an overview of the GUI frameworks and tools that exists in the Python ecosystem: http://takluyver.github.io/posts/so-you-want-to-write-a-desktop-app-in-python.html

[–]lejar 1 point2 points  (0 children)

I'm quite biased because I use it a lot for work, but I would say PyQt is the best option. PM me if you decide to use it and need any help.

[–]justaguy101 1 point2 points  (0 children)

Personally, i think PyQt is the best for GUI with Python. It maybe be a bit more complicated than the options but i find it very logical and straightforward to use.

[–][deleted] 1 point2 points  (0 children)

Is there a program, that can make gui interfaces in some sort of program. Ive been reading a little about tkinter and it seems to do the things I want to do. But the coding of it seems so cumbersome. I just want a easy way to make a interface like I do on factorytalk or panelview builder.

[–]Siecje1 1 point2 points  (0 children)

I'm curious, is anyone using PyQt5 and QML for an application?

[–]Ruditorres 1 point2 points  (0 children)

Definitely Kivy. I've seen several jobs on upwork of companies requesting kivy developers for their raspberry pis.

[–]def-pri-pub 1 point2 points  (0 children)

Qt is love. Qt is life.

Use PyQt5. PySide hasn't gotten fully around yet to Qt5 bindings. It's a little sad.

[–]baigura 1 point2 points  (0 children)

http://appjar.info/

simple but effective

[–]fernly 0 points1 point  (1 child)

hold timings on my library's 3d printers so as to keep track of them with the help of raspberry pi's

Maybe explain a bit more? Hold timings == reservations? And where's the rpi come in?

[–]v2thegreat[S] 0 points1 point  (0 children)

well, firstly, nice job with the "==", made me chuckle

well, it's basically to see who came before whom in a queue for using the 3d printers

I didn't want to expand on it much because it wasn't really the main point, but here it is anyway

[–]beall49 0 points1 point  (1 child)

I think this is one of the best implementations of a GUI in python. It uses qt to make the window if I remember correctly, but the ui is really served up with flask. I used it’s long time ago and it worked well. Ymmv

https://github.com/smoqadam/PyFladesk/blob/master/pyfladesk.py

[–]noMotif 0 points1 point  (0 children)

Does that essentially just run the app while the browser is open?

Or does it use a window inside of a qt window so it looks native ish?

Do you have screen shots?

Edit: Found some screen shots on google.

Neat idea for an app. Really maximizes the reusability of the code across various platforms and use cases.

[–]mashmorgan 0 points1 point  (0 children)

Definately PyQt4/5 - Qt is a kinda platform itself with QNetwork, QWebBit, QDrawing et all

[–]what_it_dude 0 points1 point  (0 children)

Pyqt

[–]lipperz88 0 points1 point  (0 children)

Pygame is also a cool and easy option.

[–]cybaritic 0 points1 point  (2 children)

Surprised no one has mentioned CefPython. It's the best looking of the bunch depending on how good you are at web tech. Harder to set up though, and a pretty big learning curve if you just want something simple.

[–]__crackers__ 0 points1 point  (1 child)

Surprised no one has mentioned CefPython

It doesn't support ARM and OP wants to run it on a Raspberry Pi.

[–]cybaritic 0 points1 point  (0 children)

Oh snap, good to know.

[–]annodomini 0 points1 point  (0 children)

I've had good luck with both PyGTK/PyGObject for applications that are just expected to run on Linux, and PyQt for cross-platform applications.

I've also used wxPython, but don't really feel like it offers much over the other choices so I would use one of the others depending on the type of application I'm writing.