Hanging out in the Python community, you’ll see periodic waves of excitement about Python in the browser. “Finally,” we think, “we can cast of

Why Python in the Browser Isn't Enough

submited by
Style Pass
2021-07-20 18:30:18

Hanging out in the Python community, you’ll see periodic waves of excitement about Python in the browser. “Finally,” we think, “we can cast off the dead weight of Javascript! The world will be in harmony once more, and rainbows and butterflies will inhabit the land.” Unfortunately, that’s not generally how it turns out. In this post, I’m going to talk about why it’s tempting, why it doesn’t work, and what to do instead.

But first, why is “Python in the browser” so alluring in the first place? Well, for most people who aren’t web developers (and many who are), the web is a place of pain. It’s not just the parade of languages – HTML, Javascript, CSS, Python, SQL – it’s the endless frameworks that come with them – React, Redux, Bootstrap, Flask, SQLAlchemy (and don’t get me started on Webpack). There is a fairly infamous flowchart of the learning path. And, of course, there’s the massive, disruptive churn – are we using Svelte this week? Typescript? Tailwind? Vue is so last year, darling.

What is it about the web that causes this endless, churning proliferation of frameworks? It’s because the web stack is trying to do something really difficult – and when we understand what that is, we’ll understand why saying “boo Javascript, let’s use Python instead” doesn’t really help us.

Leave a Comment