DEV Community

Python in the browser

petercour on June 17, 2019

You can use Python on the web, instead of Javascript. Yes, really. There's a project named Brython: "A Python 3 implementation for client-side ...
Collapse
 
sebastiannielsen profile image
Sebastian-Nielsen

But why?
What are the advantages?

Collapse
 
lesha profile image
lesha πŸŸ¨β¬›οΈ

it's fun

Collapse
 
sebastiannielsen profile image
Sebastian-Nielsen

I mean, sure, I do like writing in Python more than JavaScript ... but other than that, what advantages are there?

Thread Thread
 
lesha profile image
lesha πŸŸ¨β¬›οΈ • Edited

Mostly syntactic sugar i guess. I'd love to be able to use list/dict comprehensions, named arguments, but most of all, format strings.

Collapse
 
garador profile image
Garador

I personally find it appealing since I'm learning Python. Wouldn't take it to production, tough...

Collapse
 
cardiox12 profile image
Cardiox12

In theory that's very cool, but I tested it for an extension project where I needed python,
that was very painful to use for the moment, because brython doesn't support some functions related to DOM, etc.
So I hope this will get better and better.
Cool module tho. :)

Collapse
 
mdor profile image
Marco Antonio Dominguez

Has this any benefit? I mean, it seems like this adds a new complexity layer to any project without any benefit, everything which is a wrapper or non native become slower and non maintainable in a long term.
Up to now this just push a personal preference without even consider the disadvantages of the tech debt it will generate.

Collapse
 
dowenb profile image
Ben Dowen

Mind, blown. Thank you.

Collapse
 
genta profile image
Fabio Russo • Edited

JS is a magic language for browser/DOM/frontend stuff... it's useless to use another language (made with other kind of stuff in mind).

But, hey, It looks cool anyway.