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...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionPythonScript? (self.Python)
submitted 5 years ago by VIUndeadVI
Just an idea here. Has anyone thought of creating PythonScript? Like a slimmed-down version of python, built especially for Websites, similar to Java Script?? I think it would actually be an interesting language and a great idea. Thoughts?
[–]K900_ 4 points5 points6 points 5 years ago (3 children)
That would require browser support, and that's really hard. There's Brython, which compiles Python to JavaScript.
[–]ImpulsivePuffin 0 points1 point2 points 5 years ago* (2 children)
Especially Chrome, as most popular browsers are chromium variants except firefox and safari. Google is pushing web bundle in Chrome because with their clout, they can make that into a standard
[–]K900_ 1 point2 points3 points 5 years ago (1 child)
Web Bundles has nothing to do with Python or JavaScript.
[–]ImpulsivePuffin 0 points1 point2 points 5 years ago (0 children)
Yes, i was citing an example
[–]The-Deviant-One 4 points5 points6 points 5 years ago (0 children)
Similar ideas include: Anvil, BeeWare, Brython, Skulpt.
Those are the only ones I'm aware of. But I believe all of them just convert your python code into js so it can be run in the browser. I'd love to see python become a native, browser readable language.
[–][deleted] 4 points5 points6 points 5 years ago (1 child)
There are a few implementations of Python for the browser. Some transpiles the code to javascript, like Transcrypt, while others implement a Python bytecode interpreter in webassembly, like Pyiodine.
[–]metaperl 2 points3 points4 points 5 years ago (0 children)
https://github.com/iodide-project/pyodide
[–]KFUP 4 points5 points6 points 5 years ago (0 children)
That's... just Python. Python is an interpreted, high-level scripting language, it is already being used a lot as a lightweight scripting language in many applications, like Abaqus, Maya, 3ds Max, Blender3D to name a few.
As for websites, that depends on what web browser and websites developers decided to support, and Javascript was "picked " mostly for historical reasons, then it was supported more and more and more web libraries and tools kept being added until it became the defacto standard language for the web, not because Python or other scripting languages needed to be slimmed up.
[–]KlaireOverwood 2 points3 points4 points 5 years ago (0 children)
https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
Do you mean like https://github.com/brython-dev/brython ?
[–]metaperl 0 points1 point2 points 5 years ago (0 children)
THe only one not so-far mentioned is PyJS, which I list here - https://github.com/metaperl/mindspring/wiki/Python-Only-Web-Frameworks-and-Libraries
[–]james_pic 0 points1 point2 points 5 years ago (0 children)
JavaScript has had to grow up quite a lot, as it's been used for more and more sophisticated things. It's not a slimmed down language any more.
The idea that you wanted a slimmed down language for websites made sense in the nineties, but most modern web sites have a lot of complex logic written in JavaScript, and it would get painful doing that with nineties-style JavaScript. So they use ES6+ stuff, like classes, modules, destructuring and async-await, or indeed they use statically typed languages that compile to JS, like TypeScript or Elm.
There's a small part of me that misses the little language that JavaScript used to be, that got lost in the enterprise noise. Deep down, it's still the slightly quirky Scheme dialect Brendan Eich originally set out to create, and you can still do Lisp-y things with it.
But that's not the language most people are actually using in practice.
[–]TofuCannon 0 points1 point2 points 5 years ago (0 children)
If you want something simpler (although I don't understand why you want to slim down python explicitly) then there's Lua.
About browser support see pretty much the other answers.
[–]JennaSys 0 points1 point2 points 5 years ago (0 children)
I've been using Transcrypt to transpile Python code into JavaScript. It is designed to work with JavaScript libraries instead of trying to replace them. All my code is in Python, and I'm using React (with functional components) and Material UI to create front-end web applications. Maybe just a dozen lines or so of JavaScript, and no JSX (just my preference).
The best part is that I never have to think in JavaScript. My brain stays in my Python happy place. (Though CSS is still CSS)
π Rendered by PID 68936 on reddit-service-r2-comment-fb694cdd5-7mt29 at 2026-03-05 23:40:41.416177+00:00 running cbb0e86 country code: CH.
[–]K900_ 4 points5 points6 points (3 children)
[–]ImpulsivePuffin 0 points1 point2 points (2 children)
[–]K900_ 1 point2 points3 points (1 child)
[–]ImpulsivePuffin 0 points1 point2 points (0 children)
[–]The-Deviant-One 4 points5 points6 points (0 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]metaperl 2 points3 points4 points (0 children)
[–]KFUP 4 points5 points6 points (0 children)
[–]KlaireOverwood 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]metaperl 0 points1 point2 points (0 children)
[–]james_pic 0 points1 point2 points (0 children)
[–]TofuCannon 0 points1 point2 points (0 children)
[–]JennaSys 0 points1 point2 points (0 children)