I built a web browser (kind of) from scratch. And yes, it runs on Python. We stare at web browsers all day, but rarely stop to think about the sheer engineering magic happening behind that URL bar. How does a string of HTML turn into pixels? How does display: flex actually know where to put things? I decided to stop wondering and start building. I’ve been deep in the trenches building a custom browser engine from the ground up in Python. No Chromium wrapper. No WebKit. Just raw code handling everything from the network layer to the final pixel paint. But here’s the twist: It doesn’t use JavaScript. I wanted to explore a "what if" scenario: What if Python was the first-class language of the web? In this prototype, instead of <script> , you write <script type="text/python"> You manipulate the DOM, handle click events, and animate styles, all using native Python code running directly in the browser. Some of the engineering wins: ✅ Custom Layout Engine: I had to write my own Flexbox and Grid implementation. (Respect to browser engineers, like always for me math is hard). ✅ Time Travel Debugging: Since the engine tracks every state change, I built a slider that lets you "rewind" your user session to see exactly how the UI looked seconds ago. ✅ Hot Reload: Because waiting for refreshes is not cool (sometimes it is). It’s not going to replace Chrome tomorrow. It’s strictly a research prototype. But seeing my own engine parse HTML and execute Python to render a live, interactive page? That’s a feeling hard to beat. It reminded me why I love engineering in the first place, taking the "magic" apart until it’s just logic. Repo: https://lnkd.in/gXzBgcNn #Python #SoftwareEngineering #WebDevelopment #BrowserEngine #OpenSource #Coding
This is phenomenal (!) 👏
Excellent 👏👏