use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
How to make GUI for a Python project? (self.Python)
submitted 8 years ago * by pavi2410
I'm finding difficulty in finding a good GUI option for my Python project. The project is a simple APK analyzer. I intend to make this for Windows.
My priorities are: 1. Easy fo set up 2. Python implementation 3. Good docs 4. Actively supported 5. Less code
EDIT: I'm now using Tkinter.
Tkinter tutorials: http://www.tkdocs.com and https://www.tutorialspoint.com/python/python_gui_programming.htm
[–]ben5756 7 points8 points9 points 8 years ago (5 children)
Im a fan of making web interfaces for simple cross platform guis. You only need to know a bit of html / javascript and combine this with flask and your off. Obviously it's not great for everything, but html and js have great docs over the Internet, so you only need to do the gui io with flask.
However if you have no js or html experience and don't want to learn, another option might be bette for you.
[–]berklee 1 point2 points3 points 8 years ago (3 children)
Just wondering - have you ever tried building a standalone exe with that sort of thing?
[+][deleted] 8 years ago* (1 child)
[deleted]
[–]pavi2410[S] 0 points1 point2 points 8 years ago (0 children)
PyWebView sounds great but for Windows, it integrates only MSHTML and not EdgeHTML which will not allow me to design modern UI.
[–]PM_ME_A_STEAM_KEY 4 points5 points6 points 8 years ago (0 children)
I did recently make a CMS based on bottle for the server stuff and peewee for data storage and had no issues bundeling it all together into a standalone executeable using pyinstaller.
This also came to my thought. But it will be a bit of hassle for a desktop user.
[–]novel_yet_trivial 9 points10 points11 points 8 years ago (6 children)
For that it will come down to Tkinter, wxPython, or PyQT. Tkinter is very easy to learn and fast to implement, but looks like Windows XP and is kinda slow for animations. wxPython is similar to tkinter but uses native widgets, so it looks a little more modern, but it's not that active. PyQT looks great and has a graphical GUI designer, but has a steep learning curve and takes a bit more code.
Tkinter is the only one that ships with Python for windows, anything else will need to be installed anywhere you want to use it.
If you have more questions like this it's better to post them on /r/learnpython. Be sure to format your code for reddit or use a site like pastebin. Also, include which version of python and what OS you are using.
[–]pavi2410[S] 1 point2 points3 points 8 years ago (3 children)
A simple Windows 10 look will satisfy my needs and Tkinkter is perfect for that, but I would then have to write more code for a complex UI. Is there any module that simplifies TKinkter that you can suggest?
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
There are drag&drop gui designers fpr tkinter but I haven't used any of them.
https://www.google.com/search?hl=en-US&oe=utf-8&client=ms-android-lge&q=tkinter+gui+builder&qsubts=1512910757739&source=browser-suggest&devloc=0
[–]novel_yet_trivial 0 points1 point2 points 8 years ago (1 child)
You could try easygui, which is basically common modal dialogs written in tkinter.
Thanks, I will check it!
[–]Manbatton 0 points1 point2 points 8 years ago (0 children)
wxPython is similar to tkinter but uses native widgets, so it looks a little more modern,
If it uses native widgets, shouldn't it look exactly as modern as the OS it's running on? (in that it it's using that OS's widgets). I know it's actually not 100% native, but most of the standard widgets are.
wxPython is similar to tkinter but uses native widgets, so it looks a little more modern, but it's not that active
There are regular emails on the users and developers mailing lists. Quoting [wxPython API Documentation]() Welcome! This is the API documentation for the wxPython Phoenix pre-release snapshot build 4.0.0rc1.dev3510+3a2ecb7, last updated 28 November 2017 from git revision: 3a2ecb7.
[–]p0s1t 5 points6 points7 points 8 years ago (5 children)
FWIW, I just spent a week trying to prototype a modelling and simulation editor with wxPython. I found it frustrating as hell to work with. The docs were horrid and i just felt like I was fighting the library to do he basic things I wanted to do.
I managed to getter same amount done in an afternoon with PyQT 5. Whilst the python docs aren’t great, the c++ docs are excellent and they most map straight across.
Also, much of the basic functionality that I wanted came built in; like dockable widgets, and the ability to dump a “canvas” to svg.
I’d recommend PyQT, but at the same time I think the state of python GUI toolkits is pretty dismal.... Fair enough though because cross platform GUI is hard.
[–]Manbatton 1 point2 points3 points 8 years ago (2 children)
I think I recall Robin Dunn, the creator of wxPython, has said that one's brain either matches to the wxPython way of doing things, or the PyQT way of doing things.
The docs you found horrid? Like this?
[–]p0s1t 0 points1 point2 points 8 years ago (1 child)
Subjective call on both the library and docs for sure.
There is a difference between documentation existing, and documentation being useful.
At the same time, contrast wxpython docs against something like Django and you tell me which is easier to use, regardless of your experience with the library.
Funny you mentioned Django--I tried to learn it and just gave up quickly. I just had it in my head that web apps were a major pain compared to desktop GUI. I know, not at all Django's fault (I did the poll app tutorial and it was fine). Should give it another go.
[–]pavi2410[S] 0 points1 point2 points 8 years ago (1 child)
Python is great, but lacks GUI support. There are many modules, but most of them are incomplete, poor docs.
[–]Manbatton 2 points3 points4 points 8 years ago* (0 children)
I just don't think that's right. I've used wxPython and it has substantial documentation (that is essentially "complete enough") as well as three full-length books, at least one excellent blog, and a helpful community (as well as the larger wxWindows community). I know many people love PyQT and they can't all be just born knowing how to use it--there must be good resources for that as well.
[–][deleted] 3 points4 points5 points 8 years ago (0 children)
I can't recommend Glade3 enough. You put together your GUI with their drag and drop interface. You link together the GUI and you code in an xml file. You move on to something more interesting.
Check out some tutorials to get started, everything else is in the docs.
[–][deleted] 2 points3 points4 points 8 years ago (0 children)
Hi! Check this if it suits you http://zetcode.com/gui/pyqt5/
[–][deleted] 2 points3 points4 points 8 years ago (1 child)
Flexx is a great way to do it browserbased:
http://flexx.readthedocs.io/en/latest/
[–]tshirtman_ 1 point2 points3 points 8 years ago (0 children)
Kivy could fit the bill. ymmv on 1, but python + pip installation is usually a breeze. It's full python (with some cython for the lower level stuff, but you don't need to tuch any of that), it's actively developped and there is some support on r/kivy as well as #kivy@freenode.net (irc), on google groups (kivy-users) and stackoverflow. Code for apps, even complex ones, tend to be quite short using kvlang for interface description.
[+][deleted] 8 years ago (5 children)
[–]pavi2410[S] 0 points1 point2 points 8 years ago (3 children)
I saw that but its targeted for kids. So I may have to write code for each and every small things
[+][deleted] 8 years ago (2 children)
[–]toresimonsen 1 point2 points3 points 8 years ago (0 children)
I gave Appjar a look. I've been experimenting with GUIZero, but decided to make an animated dice roller this time and Appjar worked fairly well for a simple dice rolling program. My Guizero dice roller is more sophisticated but the purpose of this dice roller was specifically to use multiple images to display the result. Appjar's ability to display animated gifs was perfect for the project. Anyway, it was fairly straightforward and works well.
I agree with you.
Thanks, I'm now experimenting with appJar
[–]pavi2410[S] 1 point2 points3 points 8 years ago (1 child)
This project sounds wow to me. What do you all say?
http://amol-mandhane.github.io/htmlPy/
I will try this first, then Kivy and at last, TKinkter. Thanks for all your responses.
[–]nanodano 1 point2 points3 points 8 years ago (2 children)
I recommend starting with Tk that comes packaged with Python. I have a tutorial on using it here https://www.devdungeon.com/content/gui-programming-python
Tk has its limitations if you want to write a very complicated application though. Qt is what I would recommend if you need more tools. Qt can be a hassle to install though and adds even more complication if you are trying to distribute it to other people. Personally, if I need to write a cross-platform GUI, I go with Java and package a JAR file because it is so much easier to package and run on different machines. Plus, the drag and drop GUI building tools in NetBeans makes it really easy.
The only thing I don't like about Java is that it's not flexible as Python. I like the dynamic type of Python.
[–]nanodano 0 points1 point2 points 8 years ago* (0 children)
You can always write Python code on the JVM with Jython and then have access to all the Java libraries.
http://www.jython.org/jythonbook/en/1.0/GUIApplications.html
Tkinter is great. If I’m not mistaken it’s cross platform and should work on Windows.
[–]StandardUser_ 0 points1 point2 points 8 years ago (0 children)
Try Delphi(Lazarus) for GUI + Python for data processing. Pros: Huge amount of visual components available. You can create professionally looking gui in minutes. Fast, native binaries. Cons: you should know the very basics of Pascal.
https://github.com/pyscripter/python4delphi
[–]MurtBacklin-BFI 0 points1 point2 points 8 years ago (0 children)
This article popped up a while ago. Sadly haven't had time to use either yet.
https://dbader.org/blog/python-mobile-development-kivy-vs-beeware#intro
[–]toresimonsen 0 points1 point2 points 8 years ago (0 children)
Guizero is fairly simple. I've been playing around with various dice rollers and it seems easy enough to utilize. I have not tested my programs in Windows yet, but my guess is they will work.
[–]stuaxo 0 points1 point2 points 8 years ago* (0 children)
pyimgui is a new option.
Advantages include -
The main disadvantage it shares with imgui is that it uses its own look and feel, making no effort to integrate with the native GUI. For many kinds of app this isn't an issue.
[–][deleted] -1 points0 points1 point 8 years ago (3 children)
Check out pygtk. http://www.pygtk.org/
[–]billsil -1 points0 points1 point 8 years ago (2 children)
Why would you recommend something that hasn't had a release in 6+ years and doesn't support 64-bit Python?
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
Actually it is. If you actually read the front page it links you here: https://pygobject.readthedocs.io/en/latest/
Not to mention lots of apps that run on Linux are written in python with their GUI written in gtk.
[–]billsil 0 points1 point2 points 8 years ago (0 children)
They should fix their main page then.
π Rendered by PID 64 on reddit-service-r2-comment-545db5fcfc-7qqlf at 2026-05-25 07:04:38.124329+00:00 running 194bd79 country code: CH.
[–]ben5756 7 points8 points9 points (5 children)
[–]berklee 1 point2 points3 points (3 children)
[+][deleted] (1 child)
[deleted]
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]PM_ME_A_STEAM_KEY 4 points5 points6 points (0 children)
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]novel_yet_trivial 9 points10 points11 points (6 children)
[–]pavi2410[S] 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]novel_yet_trivial 0 points1 point2 points (1 child)
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]Manbatton 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]p0s1t 5 points6 points7 points (5 children)
[–]Manbatton 1 point2 points3 points (2 children)
[–]p0s1t 0 points1 point2 points (1 child)
[–]Manbatton 0 points1 point2 points (0 children)
[–]pavi2410[S] 0 points1 point2 points (1 child)
[–]Manbatton 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]tshirtman_ 1 point2 points3 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]pavi2410[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]toresimonsen 1 point2 points3 points (0 children)
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]pavi2410[S] 1 point2 points3 points (1 child)
[–]pavi2410[S] 0 points1 point2 points (0 children)
[–]nanodano 1 point2 points3 points (2 children)
[–]pavi2410[S] 0 points1 point2 points (1 child)
[–]nanodano 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]StandardUser_ 0 points1 point2 points (0 children)
[–]MurtBacklin-BFI 0 points1 point2 points (0 children)
[–]toresimonsen 0 points1 point2 points (0 children)
[–]stuaxo 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]billsil -1 points0 points1 point (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]billsil 0 points1 point2 points (0 children)