Dynamic communication between PyScript and JavaScript 2023
Warning !!! It is extremely easy and simple to do this !😎
PyScript was supposed to take over the world by now and replace JavaScript completely. What happened? It was supposed to bring about a huge wave of change in the world of technology.
The truth is PyScript cannot replace JavaScript, it can only help Python developers work with DOM directly, also JavaScript has been the boss man for sometime 😎 and has been ruling the world of frontend. PyScript is a new technology compared to JavaScript, released by Anaconda and enables Python code and popular libraries on web browsers.
But how does PyScript and JavaScript work together? In this article I will show you how JavaScript and PyScript can come together and even communicate with each other. We will start by writing some plain Vanilla JavaScript code first in a very straightforward html body. Let’s insert PyScript in that body.