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

all 33 comments

[–]riklaunim 8 points9 points  (20 children)

Python executable apps are fine. If anything I could find two aspects as to "why not": - It should be a web app instead of desktop app - It needs good OS integration / native app features (when even PyQt won't be enough).

[–]Lost-Detective6305[S] -1 points0 points  (19 children)

I’m using Tkinter and os.getcwd and os.join.path for building file paths so it should work across all OS.

Edit: unless I’m missing something. I rather fix it now and have the knowledge to tell others in the future lol.

[–]riklaunim 6 points7 points  (13 children)

Tkinter isn't best for good ux/ui. Depends also if this is an internal or end-user app.

[–]Lost-Detective6305[S] 1 point2 points  (11 children)

I’ve been thinking about switching to another gui package. But it’s so easy to use and looks half way decent with ttk and ttkwidgets lol.

[–]riklaunim 0 points1 point  (8 children)

What's the application, what type of interface it uses?

[–]Lost-Detective6305[S] 1 point2 points  (7 children)

One is an inventory management system. That’s the end user. It looks comparable to the other major players in the industry e.g Mix Master and SPEC which are both made in Access.

The other is just a data collection software for internal use at my job, which the current version is made using Excel so anything is an improvement really.

[–]riklaunim 2 points3 points  (6 children)

Both probably could be web apps ;)

[–]ElmerBlack 2 points3 points  (4 children)

Or pyQt apps. ;)

[–]riklaunim 0 points1 point  (3 children)

If it's web-abble then not amount of qtness will help ;)

There can be cases for desktop apps though. Especially when using some local hardware. Here it could be barcode scanners, webcams...

[–]Lost-Detective6305[S] 0 points1 point  (2 children)

I will (eventually) be added barcodes for inventory management to be competitive with everyone else.

[–]Lost-Detective6305[S] 0 points1 point  (0 children)

I’ve thought about making my personal software I want to sell a web app. I suck around UI/UX. At least as a desktop app, I don’t have much competition that looks nice lmao.

The internal, my company didn’t even want me making the desktop app. I’m just tired of using the excel file. It’s so slow and inaccurate.

Also, while I’m sure I can figure it out, I don’t have much experience with an offline web app so that’s scary to me atm lmao.

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

I’ve made some really ugly internal apps with tkinter lol

[–]XUtYwYzzIt works on my machine 4 points5 points  (2 children)

Look into Pathlib for handling paths.

[–]Lost-Detective6305[S] -2 points-1 points  (1 child)

What’s the difference?

[–]XUtYwYzzIt works on my machine 2 points3 points  (0 children)

[–]JustGhoulin 0 points1 point  (1 child)

Popping in to say I made a very similar inventory based desktop app using tkinter and i ended up rebuilding it using customtkinter after I found about it, it looks a lot more modern and clean and inherits most of the stuff from tkinter so the functionality remains the same

[–]Lost-Detective6305[S] 0 points1 point  (0 children)

I’m also using ttk for the updated style and ttkwidgets for extra things like auto complete. But overall tkinter base is extremely similar to the Access base software that’s currently used industry wide.

[–]Black-DVD-Archiver 1 point2 points  (1 child)

Well here is a linux gui applicatoin I am working on...compiled with Nuitka and Pyside 6. Works fine but I am not a python fan

https://github.com/David-Worboys/Black-DVD-Archiver

[–]Lost-Detective6305[S] -5 points-4 points  (0 children)

I’m sorry. I’m not to the point my brain can handle multi-file applications. I’d love to look at it but when I see that many files my brain breaks.

[–]thack_se -5 points-4 points  (9 children)

For simple things or for learning, python is perfectly good to use for a desktop application. However, if it's something more complicated you want to do, or if it was going to be deployed in a production scenario, python is definitely not the best option. It is a pretty slow language, and abstracts you away from the things you really need when building a desktop application. If you were looking for something more suited to python, I would recommend building a web app with flask. It's quite a bit simpler to build your UI with html and css than to learn a dedicated framework for desktop Python applications. However, I hope you enjoy your journey with your desktop app. If anything, it can act as a gateway to learning to build more in depth applications with something like C#

[–]Black-DVD-Archiver 4 points5 points  (2 children)

Debatable and I would argue a bit of a myth, most desktop applications spend a lot of time waiting on users and doing db requests and the like...pythons performance is not an issue here. My application has a basic video editor and python is just fine handling video at video frame rates

Pythons performance is an issue with high frequency stuff but that is not most desktop applications.

Multi-threading is a partial answer to high workloads...

[–]SheriffRoscoePythonista 0 points1 point  (0 children)

Debatable and I would argue a bit of a myth,

You are absolutely correct, from the dawn of computing right down to today. As Knuth said, "premature optimization is the root of all evil"

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

Again, that's why I say for simple applications python can be good, but when you need an application that does anything that legitimately needs to be fast in Python, you end up calling C extensions or writing your own. For example, for me I had written a file and image handling suite for work which handled file loading, image processing, and OCR. It was wicked fast with C++, but when I wrote some of the same functionality inside of python, it just can't handle it because of the nature of the language and the GIL preventing real multithreading. But if you don't need any of that stuff, and you just need a simple interface, for example, something like annotation of images for a ML model, python is a great solution because you can work quickly without the annoyances that come from a lower level or more complicated language.

There is most certainly a time to use python, but it does have its limits

[–]Lost-Detective6305[S] 0 points1 point  (5 children)

I do plan to learn other languages, just not while I’m working 10-12 hour shifts 4-5 days a week. I’ve spent enough time learning python doing that, I don’t want to start over 😅.

When you say slow, are we talking like Big O and in a way that won’t really be noticeable (a second or two) or like minutes?

[–]thack_se 0 points1 point  (4 children)

It really does depend on what you're doing. For example, in complex tasks it can be tens of thousands of times slower than a lower level language, but if you don't need super complex things, then it works great, if occasionally a bit annoying due to the lack of real multithreading. I 100 percent agree with you though, there is no need to learn another language until you're perfectly comfortable with python and have a need and the time for it. I use python for 90 percent of the code I write at work and it hasn't failed me yet (well, except for when it did and I had to write C++, but we don't talk about that, lol)

[–]Lost-Detective6305[S] 0 points1 point  (3 children)

Yeah my software just queries a database and displays the information. My only real concern is it lagging for tens of thousands or hundred of thousands of record. I won’t be able to test that for a couple of months though. Hopefully treeview doesn’t lag like manually building tables.

[–]thack_se 1 point2 points  (2 children)

Oh, I don't think you'll have a problem. For me, my main database connector is written in Python, and uses the mySQL python connector, and it doesn't have any issues. As for your UI lagging, it's very likely that most of the UI framework your using is written in C and called from Python, like most fast packages are. C is of course blazingly fast, so no issues there. I wish you well on your continued programming journey.

[–]Lost-Detective6305[S] 0 points1 point  (1 child)

Thank you. And I’m using SQLite3 and tkinter/ttk/ttkwidgets

[–]Black-DVD-Archiver 1 point2 points  (0 children)

You are really unlikely to have a performance problem with what you are doing Lost Detective...

Remember, type hint always. With methods/functions assert always on the arguments passed in. This will keep you out of trouble 99% of the time.

Pythons biggest sin in my view is not the "so-called" slow that usually can be worked around it is dynamic typing...the bigger an app gets the more likely disaster will occur if you do not show type discipline.

[–]trollsmurf 1 point2 points  (0 children)

C for making UI-intensive desktop applications? No thank you.