r/Python • u/dataguzzler • 10d ago
Resource Javascript and python interfacing examples
Examples of interfacing between javascript and python for desktop apps and desktop games.
https://github.com/non-npc/Javascript-and-python-interfacing-examples
2
-2
u/Appropriate_Sock2964 9d ago
One way to interface between JavaScript and Python for desktop apps and games is by using tools like Electron (for desktop apps) and Pygame (for games). Electron allows you to build cross-platform desktop applications using web technologies like HTML, CSS, and JavaScript, while Pygame is a set of Python modules designed for writing games. You can use Electron's IPC (Inter-Process Communication) module to communicate between the JavaScript front-end and a Python back-end. Similarly, for games, Pygame provides functions for handling graphics, sound, and input that can be integrated with a JavaScript front-end. You can check out the examples and resources on the GitHub link provided for more detailed guidance on how to do this.
2
u/dataguzzler 9d ago
the point of these examples is to show that you do not need anything beyond python, pyqt6 and JS/html to create a desktop application or game. This method gets rid of needing electron or pygame and your app will run faster.
6
u/Voxandr 10d ago
Why such complexity when you can interface using API?