|Brython - Python In The Browser|
|Written by Alex Armstrong|
|Tuesday, 07 May 2013|
You can see that this looks like a native script. You can also see that it is Python with a few extensions to enable it to work in the browser environment - doc represents the DOM and you can use it to select an element using indexing doc["zone"] is the element with id "zone".
Analog Clock In Python
So how does this work?
How can you add a new language to any browser?
The answer is very simple. The Brython library has to be loaded for it to work and you have to include a call to the bryrthon() function before the script starts executing - usually something like:
The project is at an early stage of development but if you want to lend a hand then visit the website.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: email@example.com
|Last Updated ( Tuesday, 07 May 2013 )|