A Python 3 implementation for client-side web programming |
Without a doubt, you've seen a clock like this in demos of HTML5
However, right click and view the source of this page... It is not Javascript code! Instead, you will find Python code in a script of type "text/python". Brython is designed to replace Javascript as the scripting language for the Web. As such, it is a Python 3 implementation (you can take it for a test drive through a web console), adapted to the HTML5 environment, that is to say with an interface to the DOM objects and events. Speed of execution is similar to CPython for most operations. The gallery highlights a few of the possibilities, from creating simple document elements to drag and drop and 3D navigation. A wiki lists some applications using Brython. You can also take a look at presentations made in various conferences. |