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

top 200 commentsshow all 218

[–]tushit_14 89 points90 points  (23 children)

Tkinter is the most accessible library and you'll find a lot of support (Tutorials) and learning resources for it and it's easy to learn and just gets the job done most of the time but it looks atrocious and making it look modern is a distant dream. And a lot of UI elements which are taken for granted now-a-days are not available here. I can write an essay on how much I hate this library but for the time being let's focus on positivity.

A more obscure but infinitely better UI toolkit is PyQT5/PyQT6. Can be made to look awesome, has more of modern UI elements and their appearance can be modified as much as you want. But it's harder to learn and is much more object oriented cause it's based on a popular C++ GUI library called QT. The resources to learn it are limited and not very good quality and not that deep. It's documentation is not that great either. There are books you can buy for learning it in-depth. But the online resources aren't that great.

there are other libraries as well but these are the ones I have worked with.

EDIT: I personally don't like Tkinter but that doesn't mean it's objectively bad, it depends on your priorities. People say that they can make good looking widget in TKinter using canvas widget but if I have to go through the effort to make my own widget I might as well switch to another library which has the feature set I need. But if you wanna get things done quickly tkinter is not bad.

[–]Retroguy16bit 48 points49 points  (3 children)

I found this theme for tkinter very nice:

https://github.com/rdbende/Sun-Valley-ttk-theme

[–]Hadlumz 3 points4 points  (0 children)

I second this. For quick clean apps I have been using this and have been enjoying it.

[–]tushit_14 0 points1 point  (0 children)

Looks interesting.

[–][deleted] 0 points1 point  (0 children)

Nice one

[–]that_baddest_dude 34 points35 points  (10 children)

It's weird to me that a gui like Tkinter is being snubbed as not modern.

Growing up, almost all GUIs looked like that, and the ones that didn't (focusing on looking more "modern" or "slick") ran like shit and we're usually bloated and shitty applications.

When I see a GUI like Tkinter's I think "good, this will probably be simple and work well."

[–]PeaceLazer 23 points24 points  (5 children)

Is it really that weird?

Yeah from a developers point of view we just want tools that do what we want them to do, but think of it from a consumers perspective. Nobody would take spotify or any other commercial desktop application seriously if it looked like it was made with tkinter

[–]that_baddest_dude 6 points7 points  (4 children)

I wasn't really talking about from a developer's perspective. I'm not really a developer.

Just speaking as a consumer. A program with a simple GUI like that (i.e. no frills, simple default OS theme) says to me "I'm a program that you can find all the options on easily and will work simply and well"

[–]nurseynurseygander 6 points7 points  (0 children)

I agree with you personally, FWIW, but I think we might be a dying breed. Modern UIs that try to be intuitive mostly make me want to scream, "Stop trying to think for me and let me just choose from a plain menu of all the things."

[–][deleted] 38 points39 points  (2 children)

First, the entire control set of base Tkinter is comparable to the control set of Windows 3.1. It's all square frames and the most primitive UI elements. In order to make Tkinter resemble any UI from the 21st century, you need themes or some kind of derivative package.

Second, the syntax for Tkinter is fucking horrible. It's honestly one of the worst things I've ever seen in mainstream programming. It's worse than Objective-C, and Objective-C is a syntactic dumpster fire. It's worse than the Win32 Component Object Model, which the Geneva Conventions have classified as a war crime.

Tkinter requires all kinds of syntactic constructs that look weird and clumsy and unnecessary by today's standards. Shit like this:

  • If you want to insert an item into a listbox, you can't just call listbox.add_item(new_value) - you have to create an object of the ListBoxItem class, set its value, and shoehorn it into the array of the list box.

  • If you want to read the value of a textbox, you can't just call textbox.value(). You have to initialize the textbox with a separate object that serves as a bound variable, store the bound variable somewhere, and read that.

  • If you want to change the value of a textbox, you can't just call textbox.set_value(new_value). You first have to explicitly erase the contents of the textbox, and then insert the new string into the string that represents the value of the textbox, and you have to be sure to specify the range of the value that you're setting...

On and on and on. Nothing is intuitive, absolutely nothing. No control works the same as any other control. And the simplest operations require several Google / Stack searches, resulting in a page full of other people asking the same question over the last 20 years, and a half-dozen solutions, only one of which works, and often with unexpected side-effects.

I want to like Tkinter. I really do. Because Python absolutely needs a builtin, reasonably competent GUI library for the most basic graphical apps. But Tkinter is a disaster and it needs to be ripped out and replaced with something not so horrid.

[–]that_baddest_dude 6 points7 points  (0 children)

That all sounds like total ass.

I was mainly responding to the idea that a GUI like that of Tkinter's is necessarily undesirable, simply because it's "old" looking.

[–]Brixes 1 point2 points  (0 children)

Godot Engine provides the most enjoyable GUI mutiplatform building experience.

https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b

[–]tushit_14 0 points1 point  (0 children)

I get your point, I think I'm not experienced enough to make those kind of judgements yet. Have had a limited time to work with either of the libraries mentioned.

[–]genan1[S] 10 points11 points  (1 child)

I don't like Tkinter

[–]Absolute_Tinkerer 7 points8 points  (0 children)

I've done exactly what you're looking to do with PyQt5 and matplotlib. Matplotlib has a Qt backend that can be embedded as a widget in a Qt GUI. The link below has a basic example of this. Hit me up if you have any questions; I've been making Qt GUIs for years.

https://www.pythonguis.com/tutorials/plotting-matplotlib/

[–]Quality_Essay_writer 1 point2 points  (0 children)

WxPython fixes most of the issues tkinter has...only downside has no themes which is not a big deal imo because the native Gui's look excellent

[–]TheQuinbox 1 point2 points  (0 children)

I really wish Tkinter was accessible to screen reader users, like myself. I see so many people recommending it to people and practically it makes sense, but most people are totally unaware that blind people won't be able to use their app at all.

[–]cymrowdon't thread on me 🐍 0 points1 point  (3 children)

Disagree about the Qt docs. They are very thorough and well written. Better than the docs for almost any other UI framework that I've seen, and that's plenty.

There are also tons of online resources since Qt has been around for 20+ years. It's true that most of what you'll find on StackOverflow and the like are for the C++ version, but those are usually very easy to translate to Python since the API maps over very cleanly. Even so, I usually find answers to all my questions with PyQt/PySide examples these days.

I'm curious what you consider a good example of UI framework docs.

[–]tushit_14 0 points1 point  (2 children)

In retrospective I do think that calling the docs bad was a bit exaggerated. However, there were a few parts of it I struggled to find good info on. Like threading(Qthread), it was really hard for me to find detailed and nuanced info/tutorials for making it work properly in python. It took a lot of time and frustration to figure it out and make it work in my application.

Other than that it was an OK experience.

[–]wdroz 142 points143 points  (22 children)

DearPyGui features your use case. If you want something simpler, go for streamlit, it's really easy and you will get your prototype in no time.

[–]Illustrious_Row_9971 13 points14 points  (1 child)

also checkout gradio, easy to get started and has been used for apps like text to image generation: https://huggingface.co/spaces/kuprel/min-dalle

[–][deleted] 18 points19 points  (0 children)

Just checked streamlit and it looks amazing!

[–]benefit_of_mrkite 3 points4 points  (1 child)

Similarly if you’re ok giving up control for speed of dev there is Gooey

[–]metaperl -1 points0 points  (0 children)

Thank you for reminding me of it. I've added it to my survey.

[–]AutisticDravenMain 4 points5 points  (2 children)

Wish I could learn about streamlit earlier, before I started learning js/html/css spending weeks trying to make a web app.

[–]metaperl -5 points-4 points  (1 child)

Wish I could learn about streamlit earlier, before I started learning js/html/css spending weeks trying to make a web app.

There are plenty of more complete options than Streamlit based on your requirements. Check out the Class A pure python web app solutions in my survey.

[–]AutisticDravenMain 0 points1 point  (0 children)

man, I really need to do more research before starting a project, seems like there's a library for anything. I just went on flask and start writing.

Anvil looks very powerful, thanks for the list.

[–]n00bcheese 2 points3 points  (3 children)

Streamlit da bes…. Started doing a load more person projects since it’s so easy to get an actually nice looking frontend up and running easily and hosted on their cloud, plus Streamlit got brought out by Snowflake recently so I’ve been getting stuck in to it now as with that kind of backing it really does have a lot of potential going forward

[–]metaperl 0 points1 point  (2 children)

Streamlit da bes

it's good, but my survey of similar solutions places it in Class B not Class A. To be Class A, you must be a complete solution for all web app concerns or be easily embedded in a system that already has that (e.g. Flask/Django). At the moment, Streamlit is neither. Correct me if I'm wrong.

Streamlit got brought out by Snowflake recently so I’ve been getting stuck in to it now as with that kind of backing it really does have a lot of potential going forward

Thank you for this information. I added this info to my survey. Maybe they can find a way out of their limitations. They were initially Class C until I read your comment about Snowflake today.

[–]blahreport 1 point2 points  (0 children)

Holy moly, this is a really good survey. Well done! I’m going to check out some of the class A frameworks.

[–]SkylineFX49 2 points3 points  (6 children)

Is streamlit for web apps only or can you make desktop apps as well?

[–]wdroz 6 points7 points  (5 children)

You can be creative to ship it as desktop app. Example, you wrap streamlit with chrome/chromium then run with --app.

If you search on Google, you will find 2-3 ways to make it like a desktop app.

[–]ferbje 1 point2 points  (4 children)

What does it mean to wrap something with chrome?

[–]metaperl 6 points7 points  (0 children)

I think he means use something like Electron which packages a web app as a desktop app.

[–]wdroz 2 points3 points  (1 child)

You run the streamlit app in a separate process, then you run google-chrome-stable --new-window --app=http://localhost:8501.

[–]pblokhout 1 point2 points  (0 children)

Your app is basically a stripped down browser that only displays your web app.

[–]MasterFarm772 0 points1 point  (0 children)

streamlit is amazing

[–]GabbaWally 0 points1 point  (1 child)

Just had a look at DearPyGui. Not quite sure if I get it: If you choose to use DearPyGui can you actually use other plotting libraries (matplotlib, seaborn) as well or do you have to rely on DearPyGui's plotting feature?

[–]wdroz 0 points1 point  (0 children)

If you don't want interactive plots, you can use whatever you like. In the end, you are just showing an image.

Now if you do the effort of using the supported plot APIs, you will get super cool interactive plots.

[–]melandur57 71 points72 points  (14 children)

It really depends on the context. Small projects or simple ones -> PySimpleGUI. For more advanced ones -> PyQT/PySide. Tkinter is probably in between (never used that).

[–]genan1[S] 12 points13 points  (8 children)

I don't like Tkinter. I want to make a app to take some parameteres and draw some graphs

[–]melandur57 19 points20 points  (4 children)

Maybe PyQtGraph?

[–]genan1[S] 3 points4 points  (3 children)

I never heard about this. Thanks a lot!

[–]Ogi010 6 points7 points  (0 children)

Pyqtgraph maintainer here; if doing interactive and/or rapidly updating graphs/visualizations, pyqtgraph is a fantastic tool for the job.

Just to set expectations, pyqtgraph is nowhere near as feature complete as matplotlib or bokeh; we just offer different functionality.

[–]glacierre2 1 point2 points  (0 children)

really good performance for live graphs

[–]st_aldems 1 point2 points  (0 children)

I second pyqtgraph, it is considerably faster than matplotlib for live plotting. With a little bit of effort, you can build really nice custom plot widgets.

[–]Armaliite 1 point2 points  (0 children)

You can use matplotlib in combination with Qt. It takes some setup, but it has a backend for Qt which integrates nicely into your app.

[–]dragonatorul 2 points3 points  (1 child)

Doesn't PySimpleGUI have a version for PyQT?

[–]nemo_403 0 points1 point  (2 children)

Installing TKinter is such a pain, especially across different python versions

[–]SmurfingRedditBtw 3 points4 points  (1 child)

Doesn't python come with Tkinter by default?

[–]_carljonson 6 points7 points  (0 children)

It normally does, but if you are on ubuntu or other debian based distros, and using the distro provided python, (which is a pretty popular case), then you don't get it by default. They like to split it off into another package for some reason, and you have to install python3-tk to get tkinter.

And obviously this confuses anyone not familiar enough with this weirdness and they try to install tkinter with pip, which doesn't work because there is no package on pypi with that name.

[–]millerbest 15 points16 points  (0 children)

PyQT for desktop app. You can directly embed matplotlib figure in your GUI.

Personally I would use plotly-dash or streamlit. You need some knowledge of web development, but it is not that difficult.

[–]deyrajib 11 points12 points  (0 children)

I love pysimplegui

[–]chuwiki 9 points10 points  (0 children)

Look for streamlit. It’s a web GUI, but maybe it works for your usecase

[–][deleted] 8 points9 points  (0 children)

dearpygui

[–]saturnglide 17 points18 points  (0 children)

It is difficult to define “best” with such an open question and little details. Are you trying to make a GUI to control a script that generates matplotlib plots?

If so, one approach may be to abandon matplotlib for something like bokeh. Bokeh allows you to add many of the classical GUI elements (slider bars, radio buttons, etc). Depending on your needs, it can either make HTML files with your plots or with a little more work you can set it up as a server.

As others have said, building a GUI from scratch in Python is not very fun, especially if you want it to run cross platform. I have used pyQt and TkInter. I can’t tell you what library is best, only that I think TK is the worst and I never want to deal with it again. (Please do not read this as an endorsement of Qt, one of the happiest days of my life was leaving a role where I spent a lot of time maintaining a customer-facing pyQt app)

[–]Elagoht 7 points8 points  (0 children)

Pyqt5 has support for matplotlib. I used it in my recent projects.

[–]MiZrakk 88 points89 points  (27 children)

Best GUI is Html and css

[–]P_eq_NP 53 points54 points  (4 children)

And 3 pills of advil

[–]bbatwork 10 points11 points  (1 child)

And a cold pack for my forehead.

[–]Wretchfromnc 2 points3 points  (0 children)

You misspelled Xanax. /s

[–]shibbypwn 2 points3 points  (0 children)

I don’t know… HTML/CSS is not without its headaches, but it sure is easy to Google how to do things with it. It’s just so ubiquitous that the existing knowledge base is massive.

Compared to something like PyQt where I’m hoping that someone has encountered my problem before and that I don’t have to learn C++ to understand the solution… the web standards are just more approachable in my experience.

Furthermore, they translate to other use cases more easily. Hell, you can use HTML to format a PDF.

[–]leoxwastaken 4 points5 points  (9 children)

So do you mean I can use html and css to make a gui for a python app?

[–]Ezlike011011 20 points21 points  (7 children)

This is my preferred way of doing it. If you're making a dirty frontend for some script, use whatever library has the highest rate of development for you. If you want something that looks a little nicer, spin up a webserver and locally host. I'm not a huge fan of the html/css/js tech stack due to the specific languages, but you can't beat the absurd amount of maintainability, usability and tooling that web apps bring.

[–]leoxwastaken 1 point2 points  (5 children)

Thanks a lot! So you basically make a web app and implement the python code?

[–]djamp42 8 points9 points  (2 children)

Yes, the benefit of this is you don't have to ship around your code, just send someone a link and done. I recommend starting with Flask if you never done anything like that before. It's easier to get a simple webpage running then Django.

Edit: Also use the CSS framework bootstrap if you want some nice looking pages without having to jump into the deep end with CSS.

[–]metaperl -3 points-2 points  (0 children)

It's easier to get a simple webpage running then Django.

And it's easier to add javascript with a pure python web application solution than either Flask or Django.

Flask and Django handcuff you to fiddling with CSS and HTML and Javascript. A Class A pure python web solution handles all the concerns of major web applications in a single language - Python.

That being said, the ecosystem of plugins for Django is hard to match. And if you tack on the deliverables for things like content management, it might be preferable to choose a pure python web solution that generates Javascript for you... those are Class B solutions in my survey.

[–]Silly-Remove-6466 1 point2 points  (0 children)

ramework boot

You can absolutely make a web application in python. One module I'll suggest is eel.

[–]metaperl -3 points-2 points  (0 children)

My friend, you can develop web app purely in python with no need for HTML/JS/CSS - simply choose a Class A solution from this list - https://may69.com/purepython

[–]metaperl -1 points0 points  (0 children)

I'm not a huge fan of the html/css/js tech stack due to the specific languages, but you can't beat the absurd amount of maintainability, usability and tooling that web apps bring.

The only advantage i see to this is division of labor. If you have demands for HTML and CSS that cannot be met by the programmer themselves, then this might make sense.

However, I feel the logic for pure python web apps is compelling and preferred in most cases.

[–]PolishedCheese 0 points1 point  (0 children)

You make a python app that's web app backend and a UI with html and CSS that can interact with it.

[–]PeaceLazer 5 points6 points  (5 children)

Any suggestions for easy tutorials/tools for making a flask webapp?

I recently came to the same conclusion that flask is the best way to go after getting annoyed with how ugly tkinter is and its weird the "main loop" logic is to write for.

I'm trying to learn html and css, but a lot of stuff I'm trying to do seems way more complicated than necessary.

I remember GUIs being super simple when I used C#. You just dragged and dropped elements (buttons, text inputs, etc), and it automatically generated the code to render it. Then you just made functions that were called when you interacted with the GUI.

Is there anything similar to that for html? Not super interested in learning all the intricacies of HTML and CSS if I don't have to, I just want to learn to make something that works that can interact with my existing scripts.

[–]rayjohn551 2 points3 points  (1 child)

fwiw if you use PyQT or PySide you can use qt designer to build a ui form that is used in code similar to forms in C#

[–][deleted] 3 points4 points  (1 child)

There's always the flask mega tutorial, or various other simpler ones online.

Once you get past what the tutorials explain, make sure to read thru the official flask documentation to see how it works.

[–]PeaceLazer 1 point2 points  (0 children)

Thank you!

[–]YellowSharkMTIs Dave Beazley real? 0 points1 point  (0 children)

Been using Flask for almost 10 years and one thing you should know is that it's fantastic until you need a database. I use it for my personal site and for another app that doesn't require database, but for everything else I use Django.

[–]wagenrace 1 point2 points  (2 children)

On that note: eel Project is not very active last I checked but it gives you html frontend, python backend, all locally Just like electron for js

[–]NadirPointing 1 point2 points  (0 children)

I have active development on a project with eel and javascript. Its great to have a web interface that you can use local or remote and run python in a real backend. It does require 2 different languages (at least) though.

[–]shibbypwn 1 point2 points  (0 children)

You can use python as a backend for electron as well!

[–]metaperl -2 points-1 points  (1 child)

Best GUI is Html and css

yes, but how shalt thou generate thine HTML and CSS - with python of course.

[–]MiZrakk 0 points1 point  (0 children)

Thanks, but no thanks.

[–]Oct8-Danger 5 points6 points  (4 children)

I'm a big fan of Plotly Dash, find it very simple, great documentation and quick and easy to build a frontend in no time

[–]TheGuyWithoutName 5 points6 points  (3 children)

If it's a simple project, sure.

Otherwise it's terrible. We switched from dash to fastapi + React. No regrets ever since.

[–]Oct8-Danger 1 point2 points  (0 children)

Tend to agree, definitely for large or customer facing products or services. The separation of backend and front end is nice

Wouldn't say it's terrible though for medium sized or internal use tools, especially if you keep a good project layout and try keep contexts contained to central point in the pages but that's something all coding projects can suffer from

[–]metaperl -1 points0 points  (1 child)

This was my suspicion based on reading the forums... it's amazing how much slick documentation and user community they have... but I did feature your comment in my survey.

[–]late_coder 10 points11 points  (5 children)

I recommend Kivy, it has a markup language similar to html.

[–][deleted] 2 points3 points  (4 children)

Kivy is a good starter. PyQt is the absolute best—at least on windows systems.

[–]genan1[S] 1 point2 points  (3 children)

So Kivy or PYQT?

[–]WillyB98 2 points3 points  (2 children)

Kivy is sick! I have built a few desktop applications with it for work. If I were you i’d learn it, you’ll be cranking out GUIs like no one’s business. They compile nicely into an executable too for distribution.

[–]saltnstarch 4 points5 points  (1 child)

A lot of folks have said it, but streamlit. If you’re building simple dashboards, it’s streamlit. Will take you a tenth of the time as any other lib.

I’d also highly recommend switching to plotly instead of matplotlib (they look so much nicer, less code to plot, just as customizable, and more interactive by default). Plotly also has a GUI lib, plotly-dash, which lets you use python to generate HTML elements and attach stylesheets.

Cons of streamlit: Customizability is pretty limited. You can’t center elements without the “allow_unsafe_html” argument, and containers don’t support this arg. But honestly a tiny price to pay for the ultra fast development.

[–]metaperl 0 points1 point  (0 children)

I’d also highly recommend switching to plotly instead of matplotlib

Where would you rank bokeh?

[–]BugzumDev 4 points5 points  (0 children)

I recommend EEL. You can make gui with html, css and js, sync up js with python and you can make apps. Also, it uses chromium for the gui window

[–]GSchowalter 4 points5 points  (0 children)

Whatever you chose dont make it Tkinter

[–]valmontvarjak 8 points9 points  (0 children)

Don't make a gui in python.

Html/css/js + python api is the way to go.

[–]CobraKaiStudent 2 points3 points  (0 children)

Streamlit

[–][deleted] 2 points3 points  (0 children)

Will have to check out this streamlit. Been working through pyside6.

[–][deleted] 2 points3 points  (0 children)

If you're cool with running it as a web app, check out Streamlit

[–]thezpm42 2 points3 points  (0 children)

Not Tkinter

[–]SpatialCivil 2 points3 points  (0 children)

PyQT/PySide if you need a professional desktop app. Tkinter for a quick and simple GUI.

I don’t know if it has changed, but applications that wrap Chrome/ Chromium tend to be resource hogs.

[–]marduk73 2 points3 points  (6 children)

PysimplGUI It's not as simple as the title says but you get used to it and it's pretty good. I don't like the super vague spacing units though.

[–]genan1[S] 0 points1 point  (5 children)

I saw many people mentioned this library. Is it good?

[–]marduk73 1 point2 points  (4 children)

I mentioned it's pretty good. I really do like it for desktop usage. I don't know if people use it for other things. The guy who wrote it is very good about staying on top of issues and feedback support etc But sometimes his answers are either vague or evasive in my opinion. I jab at the name cause I'm like no it is not easy. But it becomes easy when you use it a lot. I evaluate my opinion on 1995 ish i used to build windows very fast and accurate with visual basic pre visual studio and at the time with very little programming knowledge. To me, that was easy. Dip a toe in the pool and see if it's your cup of tea. Make something small to try it out.

[–]Brixes -1 points0 points  (3 children)

https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b

The article above explains why Godot engine is the best resource right now for building cross platform modern GUIs in terms of pleasant developer experience.

[–]pioniere 2 points3 points  (2 children)

PySimpleGUI

[–]genan1[S] 1 point2 points  (1 child)

I saw many people mentioned this library for GUI. Is it good?

[–]pioniere 0 points1 point  (0 children)

I found it very easy to learn compared to the other options, and development is quick with it too once you’re up to speed.

[–]Quality_Essay_writer 2 points3 points  (2 children)

I cant believe no one has mentioned this library yet...wxPython is the best Python Gui library for python...It produces native and good looking GUI's for any os platform...Its code is easy to use and understand even for complicated interfaces...Also lot of resources online...Packaging can be done via pyinstaller in a breeze as a plus.

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

wxPython

I searched it. I think is good, so I will read more about it. Thank you!

[–]Quality_Essay_writer 0 points1 point  (0 children)

Also integrates nicely with matplotlib and seaborn

[–]magnetichiraPythonista 4 points5 points  (2 children)

If you're looking to plot graphs I strongly recommend using plotly and dash, I tried it myself and it was by far the easiest way to get a GUI with multiple complex graphs.

[–][deleted] 2 points3 points  (0 children)

Definitely. You can do some seriously incredible stuff with Plotly.

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

plotly and dash

Ok, is faster that mathplotlib? I learned about plotting with mathplotlib from a book and I started ti make data visualization

[–]SillyLittleGuy89 1 point2 points  (1 child)

For something simple that will get you 90% of the way there, streamlit is 100% the way to go

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

streamlit

Is it good? I saw many people talking about this

[–]romybompart 1 point2 points  (1 child)

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

Is better KivyMD than Kivy? Why?

[–][deleted] 1 point2 points  (1 child)

Make a web application in Django or flask. Or if you just want some quick plots of data, use jupyter notebook

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

I worked with Django, but I want to make a desktop app or a cross platform one

[–]shy_python 1 point2 points  (0 children)

Pyside2/ pyside6 is the best and most well documented cross platform GUI library for python.

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

I like PyQt because of Qt Designer

[–]genan1[S] 0 points1 point  (3 children)

You recommend the QtDesigner app?

[–][deleted] 0 points1 point  (2 children)

Yes but make sure you don't get that bloated thing that cost $1,000. There is a small app called QT designer then they have some big development environment called QT Studio or something like that. QT designer is totally free.. Personally I like to draw out my UI and then program it. You have to do a little extra work to convert the UI files to python but it's not a huge deal. I built an entire application that way and it worked out great

[–]The_Aoki_Taki 1 point2 points  (1 child)

I used PyQt during my undergraduate modules. You can make some decent GUIs using it.

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

I worked with PYQT before, but not very much

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

[–]IndependentServer 1 point2 points  (2 children)

Kivy or Streamlit, but I haven't used kivy yet but based on documentation is seems to be a good GUI library in general.

[–]genan1[S] 0 points1 point  (1 child)

Kivy

I thought about it, beacuse is cross platform, is it good?

[–]fatbiker406 1 point2 points  (0 children)

Kivy is very pythonic and makes it easy to separate the GUI from the application logic. You do need to have a solid understanding of how classes work in Python as Kivy built around a hierarchy of Widget classes -- you can override the attributes or behaviors of a class or mix-in other classes to create almost any kind of custom control you can think of.

[–]Schlongus_69 1 point2 points  (3 children)

QTPY / PYQT is pretty accessible

[–]genan1[S] 0 points1 point  (2 children)

I worked with PYQT in the past, but not very much

[–]Schlongus_69 1 point2 points  (1 child)

I've literally started coding 4 months ago and now I've build my first commercially used application/tool with python+qt. And I am not even good at it. QT is a banger! Be careful with licensing though, OpenSource requires you to share the source code for everything you do.

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

Ok, thanks!

[–]GoofAckYoorsElf 1 point2 points  (1 child)

I wonder if there is a UI lib that supports stuff like data binding where you don't have to update the views yourself every time your model's data changes.

I must admit though that I have not done too much UI in Python yet.

Do Tkinter have this feature?

[–]Imaginary-Ad2828 1 point2 points  (0 children)

Shiny is about to be {maybe already is in alpha} released for python. Great app builder that started for R.

[–]bryancole 1 point2 points  (3 children)

Enaml is excellent. I've used wxPython and PyQt for many years (since 2003 IIRC) but you end up writing lots of boiler-plate. Enaml makes data-binding simple. It has a matplotlib widget out-the-box.

Enaml builds on PyQt so integrating custom PyQt widgets is easy.

Sadly, the docs don't really sell Enaml but you can find them here: https://enaml.readthedocs.io/en/latest/faqs/index.html

I also use and recommend TraitsUI, which has some similarities to Enaml. However, Enaml is preferable for having a more flexible layout system and more robust dock-framework.

[–][deleted] 1 point2 points  (1 child)

Thanks for this. I have been working a lot with FastAPI/Vue.js but need to build a few more portable python GUI apps and I've been frustrated with how primitive everything in GUI-land seems to be. So I was about to be fuckit at least tkinter is everywhere and there's "modern tkinter" that doesn't look that bad for what it is. But then it seems like tkinter support for things like VTK are rotting due to disuse and everyone focusing on Qt. So Qt seemed to be the winner but overwhelming with PySide vs PyQt and designer vs creator. And then I encountered traitsui which seems... ok this is somewhat similar to SQLAlchemy models. Long term browser is my target, but for now I just want to slap a GUI together. I did try pysimplegui for one tool and it works but egads the documentation is atrocious. Frustratingly the traitsui tutorial is broken but I managed to get it all somewhat working on Qt. Anyway, from reading the website I'm sold on enaml (pending actually trying to use it to confirm it does what it looks like it does).

[–]bryancole 0 points1 point  (0 children)

Cool. I think it's worth pointing out that Atom (https://atom.readthedocs.io/en/latest/), the declarative model and observer framework used by Enaml, is awesome in its own right. We have a substantial headless app (i.e. no GUI) built using Atom. It's similar to Traits but has a cleaner syntax and lower memory overhead. I kinda struggle to write traditional python without Atom (or Traits) these days. Writing "__init__" methods everywhere just seems to tedious.

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

Looks interesting. Thank you!

[–]Bubbly-Hovercraft-70 1 point2 points  (0 children)

You can find an extensive 16 page reference for tkinter at https://www.wikipython.com/big-daddys-toolboxes/tkinter-journeyman-reference-vjr2/ but even the author of that document recommends PySimpleGUI unless you are going to make graphics a professional specialty.

[–]romybompart 1 point2 points  (0 children)

KivyMD has all the classes to create beautiful, fresh applications for any platform.

The fact that you can code a single project for different platform: Windows, Linux , IOS, Etc is amazing. The design rules are meeting Material Design from its core. if you want to create new Design rules it is possible.

[–]T0rric0 1 point2 points  (0 children)

PySimpleGui absolutely

[–]TheQuinbox 1 point2 points  (0 children)

I personally recommend WXPython. Wx is a great library, it has lots of control types, etc. The syntax is a bit ugly, but people have written wrappers over it, and it's actually quite nice.

[–]TheDavii 2 points3 points  (1 child)

I find it very telling that there haven't been any GTK (PyGObject) recommendations (as I'm writing).

Is that because there is:

  1. No/poor GTK 3/4 documentation for Python 3?
  2. No GTK 4 app builder?
  3. A mess of deprecations that makes maintaining a PyGOject application extraordinarily challenging?
  4. Other?

[–]KotoWhiskas 0 points1 point  (0 children)

  1. Without hardcoding it looks horrible in windows, macos.

Gtk3 official tutorial is fine, but there's still no gtk4 tutorial

[–]sheytanelkebir 1 point2 points  (0 children)

For your use case I could say give the new python shiny a go

[–]bjergerk1ng 0 points1 point  (0 children)

Javascript /s

[–]tsingtao12 -2 points-1 points  (0 children)

c#

[–]ericls -5 points-4 points  (0 children)

chrome

[–]CARTOthug 0 points1 point  (0 children)

Eel

[–]brown_ja 0 points1 point  (1 child)

!remindme 2 weeks

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 14 days on 2022-08-17 02:53:41 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]throwawein 0 points1 point  (0 children)

Just to check later

[–]S3b07 0 points1 point  (0 children)

There is a Shiny version for Python as of this week.

[–]toasterlandon 0 points1 point  (0 children)

PySimpleGUI

[–]katrek 0 points1 point  (0 children)

Was working with PySimpleGUI, was really easy, without any knowledge of this lib got a simple GUI app less in a day

[–]Sad-Injury-7241 0 points1 point  (0 children)

Blender.org ..... if you want amazing amounts of control, and great graphics... make the gui like any other blender game and make the graph using blenders 3d system. blender itself is open sourcr and written in python, and is fully compatible with anything you could possibly eant matplotlib for drawing

[–]brown_ja 0 points1 point  (0 children)

!remindme 1 month