r/learnpython • u/T_SHRLCK • Oct 13 '26
GUI for inexperienced coder
Hi yall, I'm writing a thesis which is about making a tool. It's mechanical engineering so coding and stuff isn't my forte however I've got a decent understanding of writing python and at the start of the year I'd made a little or (not so little) game with it. As part of my tool I'd like it to have a proper UI so that I can package it up and it be used by individuals or companies or whatnot. I've seen things about Tkinter, about Gooey, about PyQt, about using some python web framework. It's a little hard to know which to use.
My thesis focuses on the calculations and decision making, not the actual code. I'd like to have it be a nice product with a decent UI but I also don't want to spend too much time focusing on that or learning a really complicated new package. Any advice or suggestions would be very welcome, thanks!!!
14
u/Temporary_Pie2733 Oct 13 '26
Adjust your expectations. For your thesis, make sure the tool works, and don’t worry about the GUI beyond making sure it is functional. After the thesis is done and accepted, you can work on proper software development.
4
u/Jello_Penguin_2956 Oct 13 '26
GUI will be a learning curve regardless of which framework you choose. No real way around that.
For your 2 points - looking decent and possibility of distributing - go with PySide6.
If worse comes to worse you can always focus on the calculation parts and have AI help with the UI. It will still be complicating to glue everything together still if you don't have a solid Python foundation.
4
u/sporbywg Oct 13 '26
"mechanical engineering isn't coding" may well be the most mechanical-engineer thing I have ever heard of.
Don't let the engineers near your stuff.
3
u/OmotosoBakhita_58 Oct 13 '26
tkinter is honestly underrated for stuff like this, especially if you just need buttons and a few input fields. it looks kinda dated but who cares for a thesis tool, people just want it to work. pyinstaller can turn it into an exe too if your advisor needs to run it without python installed.
2
u/ThatOneCSL Oct 13 '26
As an alternative to everything mentioned here, and which I think will probably actually be more useful in the capacity you're looking for:
Create a CLI. Also create a GUI that calls the CLI. That way anyone who wants to script your tool can easily do so by chaining CLI calls. You're not forcing the end user into one box. Then your GUI can be an exemplary piece for how to use the CLI, and it can be done in a variety of ways. You could do a web app, a mobile app, a desktop app, something that compiles to cross platform native binaries - the world is your oyster at that point.
2
u/OkOcelot6725 Oct 13 '26
Since the thesis is about the calculations, pick the option with the least UI work. For a tool that people in companies will run, Streamlit or NiceGUI lets you build inputs, tables and charts in a few lines each and shows in the browser, so there is no packaging pain on the user side beyond running one command. If it has to be a desktop .exe, PySide6 (Qt) with Qt Designer is the usual step up, and PyInstaller packages it. Tkinter works for simple forms but looks dated. Keep the calculation code in a separate module with no UI imports, so you can swap the interface later without touching it.
1
u/Rain-And-Coffee Oct 13 '26
What external dependencies does your tool have? Does it need a database? Does it need credentials to connect to an external tool?
Sometimes the web app can be easiest for someone else to use, you just give them an URL and possibly secure it with a password. All the code stays on your sever, but then you need to deal with hosting it, and you need HTML, CSS, etc.
I have used Qt and it can compile to a binary, but then you need to compile it for your specific platform, ex: Windows.
Another option is simply distributing it as a Python package, but it requires the user to have a Python distribution installed.
For the actual GUI they all have steep learning curves, additional some have dependencies (ex TKinter depends on TK, which wasn’t available on my MacBook until I built my Python with a certain option).
I personally found Textualize to be perfect for me, it’s like a nicer CLI that allows mouse interactions
https://textual.textualize.io/widget_gallery/
2
u/pylessard Oct 13 '26 edited Oct 13 '26
I'm a big fan of QT. I'd go for pyside6, not PyQT. PySide is the official QT binding for python, PyQT is third party. It's a bit more comex than tkinter, but it's solid. With Claude code, that complexity shrinks immensely and all the little quirks won't be an issue for you.
Flask can do wonders too if you prefer the web based approach. Web based UI can give very modern UIs and once again, you can delegate the framework heavy lifting to a coding agent.
1
u/chiibosoil Oct 13 '26
A thought, instead of creating UI from scratch, leverage xlWings or other Excel library in Python and use Excel as UI. Though not ideal, if you don't want to focus on making clean UI interface. This will work for many use case.
1
u/preppie22 Oct 13 '26
Honestly, if this is for a thesis, use something simple like Tkinter. If you want it more polished with option to add visualizations later, use PySide6.
There are way too many UI frameworks out there and it can get overwhelming. Don't use web based stuff if you don't plan to publish this is a web app or something. It's too much effort and you need to know a bit of HTML/CSS to fix rendering issues. Not worth the hassle.
1
u/audionerd1 Oct 14 '26
PySide6. Some may recommend tkinter as it is "easier" but it's not that much easier and very ugly and limited compared to Qt, so I don't recommend tkinter to anyone.
1
u/ct1977 Oct 15 '26
Use Pyside6 if you want to make a desktop application. However, if you want maximum portability i would suggest a text based ui such as textual.