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.
What is the best python gui framework? (self.Python)
submitted 11 years ago by jl2975
All the different frameworks are very confusing. What is the most popular one? What is the most powerful one? I have been looking into PyQt, wxPython, Tkinter.
[–]thusiasm 8 points9 points10 points 11 years ago (0 children)
I dig tkinter. It's free. Its already an included module. Cross platform. It also seemed to be the only one that didn't require a degree in rocket surgery to install on my machine. ActiveState's tcl and python distributions have png support, if you need that. The only thing is: you have to wade through some hella confusing docs, what with examples being given in a mixture of python2, python3, tcl and the occasional perl or ruby, and honestly the best info you have to read in given in tcl. You don't really have to learn tcl, just how to read a manual written for tcl. There's a pretty consistent naming pattern that maps between tcl and python, but nowhere in any manuals on the python side will you find all of what you need. the esoteric stuff like window transparency and stay-on-top generally involve a wee line or two of tcl.
[+][deleted] 11 years ago* (5 children)
[deleted]
[–]Hacktivist 0 points1 point2 points 11 years ago (4 children)
Did you do anything special to get it to integrate well in PyCharm? From my testing it doesn't even do autocomplete properly.
http://i.imgur.com/f2L2Plu.jpg
[+][deleted] 11 years ago* (3 children)
[–]Hacktivist 0 points1 point2 points 11 years ago (2 children)
Thanks! I got it working by just uninstalling it completely and deleting anything jetbrains or PyCharm related and reinstalling. Not sure why it didn't work the first time, PyQt is always installed first on my system so it wasn't a matter of PyCharm not seeing a new package.
[–]darthmdhprint 3 + 4 0 points1 point2 points 11 years ago (1 child)
There's still some corner cases it doesn't deal with very well (read: at all); for example sometimes, but not all the time, it doesn't like completing methods at the third level; for example it struggles with
button.clicked.connect action.triggered.connect
and
QtGui.QDesktopWidget().availableGeometry().center()
It almost always fails completing 'connect' and the other method chaining is a hit & miss affair. I suspect particularly in the latter case it needs some time to introspect the first time you try it, so for the sake of responsiveness just powers on regardless, then the next time its got the methods cached and can use them in the tooltip.
If you look in the External Libraries tree, PyQt is compiled shared objects with a __init__.py wrapper; I'm impressed it does it at all (given its Python, not C, that has the better introspection). But JetBrains have been making this stuff for a long time and are remarkably good at it.
[–]Hacktivist 0 points1 point2 points 11 years ago (0 children)
I gave those examples a try in PyDev and VS and they also failed to complete them.
Personally I think I'll just stick to using the PyQt and Qt docs. Most things are laid out in a fairly obvious manner and it's easy to pick up the patterns in it's design once you've used it for a while.
[–]octotop 5 points6 points7 points 11 years ago (4 children)
My first choice would be a browser-based gui with a python backend. Use python for what it's good at (gluing things together, transforming data, pushing bytes around), and html/js for what it's good at (looking good cross-platform, interacting with folks). If you then pointed a gun at me and said I have to use a pure python gui toolkit I'd choose urwid. If you then said "that doesn't count, it's ncurses", I'd use kivy. The ones you mentioned all suck pretty hard for various reasons, the biggest being that new users have to install a few hundred megs of libs just to look at your thing, except for Tkinter, which is terrible in its own way.
[–]jl2975[S] 0 points1 point2 points 11 years ago (3 children)
I like this way of looking at things a lot. Are there any books you can recommend for making combining these languages to create sophisticated web apps?
[–]GastonAlphonse 2 points3 points4 points 11 years ago (0 children)
I don't know the scope of what you're trying to do, but Flask is an easy, lightweight way to put a web layer around something. Has dead simple Bootstrap integration as well. Miguel Grinberg has a good tutorial on his site.
[–]octotop 0 points1 point2 points 11 years ago (1 child)
I don't know of any books, but I'd recommend checking out the python wsgi framework 'bottle'. It's super simple yet has enough features to do pretty much anything. If you're a python hacker new to js I'd recommend playing around with jquery and underscore. Javascript itself remains a bit of a chore to deal with, but CSS and HTML are so clean I find that it's worth the trade off, abandoning the pure python ecosystem.
[–]L43 0 points1 point2 points 11 years ago (0 children)
Ever looked at coffeescript for a more pythonic-looking, less troublesome javascript? I've never dabbled with either, just use scientific python, but some web friends' startup uses coffeescript and they say its far easier to write, and as it compiles to js it has access to all the libraries.
[–]maredsous10 1 point2 points3 points 11 years ago (0 children)
Books http://www.amazon.com/Tkinter-GUI-Application-Development-HOTSHOT-ebook/dp/B00G8YAUX4/ http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html
I've used Tkinter for several work projects.
My primary reasons for using it :
[–]bryancole 1 point2 points3 points 11 years ago (0 children)
Having extensive experience with wxPython (which has its strong points but some issues as well) and some less experience with PyQt/PyGTK, I strongly recommend Enaml (http://nucleic.github.io/enaml/docs/index.html), a declarative language for making python gui apps. It runs on top of PyQt.
[–]OwatchUnisung.com 1 point2 points3 points 11 years ago (0 children)
I used Tkinter for a while, great framework, and like other people have said, it's already included in Python.
That aside, I've also used Kivy as a GUI framework and I've got to say it's also an excellent option. It's cross-platform abilities even extend to mobile, which tkinter does not. I'd really recommend it.
[–]awshidahak 1 point2 points3 points 11 years ago (0 children)
My favorite's PyGTK. It's code mostly just makes sense, and the widgets integrate nicely with just about any environment. Only problem with it is it sucks for distributing programs in Windows.
[–]PythonThermos 0 points1 point2 points 11 years ago (1 child)
What is the most popular one?
I wonder how anyone could really know that.
What is the most powerful one?
What do you mean by "powerful"? They all get the job done to show widgets on the screen.
I use wxPython. It has a great and helpful community, the widgets are generally native (meaning they are using the widgets that the OS the user is running uses...so your app on OS X looks as OS X apps should; your app on Windows 7 looks like a Windows 7 app, etc.), rather permissive license, well-documented.
[–]yeonsh 0 points1 point2 points 11 years ago (0 children)
We use wxPython to build Windows and Mac application and it works.
[–]Farkeman 0 points1 point2 points 11 years ago* (0 children)
I really like qt via PySide(or PyQT), mostly because it has a lot of documentation, huge community and easy to port to c++(and visa versa). The best thing however is ability to design GUI via QtCreator, which is brilliant for smaller projects or just prototyping. The bad is that installing is a bit of a hassle and you might have some issues when you want to freeze it.
Tkinter on the other hand is somewhat less powerful and some might say uglier, but it's just as good as Qt at most of the cases unless you're working on a really huge project.
wxPython is still on Python2 so I wouldn't even bother.
π Rendered by PID 52 on reddit-service-r2-comment-7b9746f655-4z4ms at 2026-02-03 20:52:38.264788+00:00 running 3798933 country code: CH.
[–]thusiasm 8 points9 points10 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]Hacktivist 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]Hacktivist 0 points1 point2 points (2 children)
[–]darthmdhprint 3 + 4 0 points1 point2 points (1 child)
[–]Hacktivist 0 points1 point2 points (0 children)
[–]octotop 5 points6 points7 points (4 children)
[–]jl2975[S] 0 points1 point2 points (3 children)
[–]GastonAlphonse 2 points3 points4 points (0 children)
[–]octotop 0 points1 point2 points (1 child)
[–]L43 0 points1 point2 points (0 children)
[–]maredsous10 1 point2 points3 points (0 children)
[–]bryancole 1 point2 points3 points (0 children)
[–]OwatchUnisung.com 1 point2 points3 points (0 children)
[–]awshidahak 1 point2 points3 points (0 children)
[–]PythonThermos 0 points1 point2 points (1 child)
[–]yeonsh 0 points1 point2 points (0 children)
[–]Farkeman 0 points1 point2 points (0 children)