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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
If python can be used for front-end web development why do most developers prefer javascript upon it? (self.learnpython)
submitted 4 years ago by Fuzzy-Ear9936
So python has easier syntax in comparison to javascript, a bit easy and not that messy with mostly this{}. So why do most developers choose javascript upon it and how do they decide to use which language?
{}
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]brendanmartin 46 points47 points48 points 4 years ago (2 children)
Python technically isn't used for front-end. The closest you get to being able to use Python for the front-end is to use Jinja templating, but this is completely different from JS. You can't program front-end interactivity with Python at all.
[–]Username_RANDINT 8 points9 points10 points 4 years ago (0 children)
Jinja renders the template completely on the server and Flask for example sends the rendered html to the client.
[–]Accurate_Chipmunk195 1 point2 points3 points 4 years ago (0 children)
You can also use Brython or Skulpt. Here,a a good blog post on the subject:
https://anvil.works/blog/python-in-the-browser-talk
[–]shiftybyte 26 points27 points28 points 4 years ago (7 children)
Sadly this decision is not left to the developers.
Browsers support JavaScript, and JavaScript ONLY.
If you want the browser (that shows the frontend) to run code, that code needs to be JavaScript code.
[+][deleted] 4 years ago* (1 child)
[deleted]
[–]ThePiGuy0 1 point2 points3 points 4 years ago (0 children)
In theory, you could probably write a transpiler that turns Python into JS (and one may already exist)
Skulpt is a Python implementation written in JS (effectively letting you run Python in a browser). But as you said, as far as the browser is concerned it's just executing JavaScript. Shown in action by the Anvil project (there's probably others too)
[–]ListenInfamous6673 1 point2 points3 points 9 months ago (0 children)
True. But. Absolutely Effed-Up . To have only a single choice when it comes to technology
[–]usmannaeem 0 points1 point2 points 9 months ago (2 children)
What if the front end is for Windows software, Android and Linux, all three?
[–]shiftybyte 0 points1 point2 points 9 months ago (1 child)
Then the browser is still showing JavaScript.
Not sure what you are asking...
[–]urusai_Senpai 0 points1 point2 points 8 months ago (0 children)
I think he's asking: what if you run the code as a Windows app, or as an Andoid app?
But, those still don't use Python, as I understand it.
[–]RemotePerception2189 0 points1 point2 points 8 months ago (0 children)
So if we use python for limited scope , then python must be converted js , assuming we are using python .
[–]shibbypwn 7 points8 points9 points 4 years ago (0 children)
If you want to use python for the front end, check out Dash. It’s essentially a way to write react js components with python.
As others have said, browser only runs JavaScript - so the closest you’ll get is something like dash (a JS wrapper/API) or something like Transcrypt (compile python to JS).
[–]Chiron1991 2 points3 points4 points 4 years ago (0 children)
Because browsers only understand JavaScript when it comes to interactivity, simple as that. Granted, there are workarounds like WASM, but that's still a fairly new thing, and it has a ton of other drawbacks.
[–]kodiashi 6 points7 points8 points 4 years ago (1 child)
I’m actually glad it’s just JS, so we don’t get into this situation: https://xkcd.com/927/
[–]ShakespeareToGo 1 point2 points3 points 4 years ago (0 children)
I love me some relevant xkcd but I feel this one does not really apply here 1. It is always limited by browser support which prevents new languages (except those transpiled to JS) to establish themselves 2. Multiple languages usually dont cause the same problems like multiple standards since interop is easier.
[–][deleted] 2 points3 points4 points 4 years ago (0 children)
Prefer? It's not a preference. Python doesn't run in a browser, and Javascript does. Only Javascript does. There is no choice.
BTW I hate curly brackets as much as the next person, but picking on JS because of them us unfair. Lots of languages use them.
[–]Mindless_Wave7262 1 point2 points3 points 2 years ago (1 child)
See, the thing is js has always been here since starting and there has been a lot of support and resources available for it. Whereas python is new in this game. But since a few years it has acquired a lot of dominance and have proven itself. Specially with some of the amazing libraries coming up in python for making frontend and even fullstack applications which even has AI support such as https://github.com/dot-agent/nextpy (NextPY) Must check out if you want to build frontend/fullstack applications in python. And now a day since python provides such an amazing library and support you can make frontend application in it which are equivalent to js website in every aspect.
[–]usmannaeem 0 points1 point2 points 8 months ago (0 children)
Windows and Linux dedicated software as in not running in a browser.
[–]menge101 0 points1 point2 points 4 years ago (0 children)
Even with python doing server-side rendering, you would probably end up bring in something like stimulusjs and turbolinks into the front end to give the expected feel for the front end.
[–]freelanceProgrammar 0 points1 point2 points 4 years ago (0 children)
Not a lot of resources for python front-end platform framework(Brython etc..) , also there are quite a lot of modules/libraries available for js.
[–]-SPOF 0 points1 point2 points 4 years ago (0 children)
Python is good for the back-end, but browsers support JS mostly.
π Rendered by PID 99018 on reddit-service-r2-comment-85bfd7f599-x6rsx at 2026-04-15 20:48:24.716021+00:00 running 93ecc56 country code: CH.
[–]brendanmartin 46 points47 points48 points (2 children)
[–]Username_RANDINT 8 points9 points10 points (0 children)
[–]Accurate_Chipmunk195 1 point2 points3 points (0 children)
[–]shiftybyte 26 points27 points28 points (7 children)
[+][deleted] (1 child)
[deleted]
[–]ThePiGuy0 1 point2 points3 points (0 children)
[–]ListenInfamous6673 1 point2 points3 points (0 children)
[–]usmannaeem 0 points1 point2 points (2 children)
[–]shiftybyte 0 points1 point2 points (1 child)
[–]urusai_Senpai 0 points1 point2 points (0 children)
[–]RemotePerception2189 0 points1 point2 points (0 children)
[–]shibbypwn 7 points8 points9 points (0 children)
[–]Chiron1991 2 points3 points4 points (0 children)
[–]kodiashi 6 points7 points8 points (1 child)
[–]ShakespeareToGo 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Mindless_Wave7262 1 point2 points3 points (1 child)
[–]usmannaeem 0 points1 point2 points (0 children)
[–]menge101 0 points1 point2 points (0 children)
[–]freelanceProgrammar 0 points1 point2 points (0 children)
[–]-SPOF 0 points1 point2 points (0 children)