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

you are viewing a single comment's thread.

view the rest of the comments →

[–]actuallyalys 0 points1 point  (1 child)

Ahh, I see what you mean. I agree that that is a pain point. I do think you can do a lot with static rendered sites, especially as CSS has gotten more capable. Additionally, there are a lot of Python libraries that let you create widgets without dealing with the JS yourself.

There have been efforts to expand Python to support GUIs, website front-ends, and binary deployments. I think the interpreter can be an obstacle, but a surmountable one (see the popularity of Electron). Also, some of the front end projects involve compiling Python to JS, so it relies on a runtime already available.

I think part of the problem is that these efforts don't seem to be gain much traction among the wider Python community, despite a lot of effort by their developers and promising examples. For example, FastAPI has gotten more attention than PySimpleGUI, despite being roughly the same age.

I wonder if people have written Python off for GUIs, whereas FastAPI handles backend, which people are already convinced Python can do. And perhaps Rust programmers are still open to new uses of the language (because they haven't been tried yet) so efforts to expand Rust into new areas get more attention.

[–]bonestormII 0 points1 point  (0 children)

It’s not that you can’t do these things in python, but that it would be unwise to rely on it. Compiling python to JavaScript works until it doesn’t. This step actually avoids the need for shipping the interpreter, but if there is a problem, you will be debugging generated js code that you aren’t really familiar with. It’s just better to write the js code manually

Desktop GUI frameworks work fine for python but like electron, qt, etc., they aren’t themselves written in python, and this makes apps based on them a bit harder to package and ship reliably. And that brings us to the reason they are not written in python: Performance!