IntroductionInstallationLimitations of the "file" protocolFrequently asked questionsSyntax, keywords and built-in functionsStandard distributionimport implementationBrython packagesBrowser interface
Introduction - DOM API
Creating a document Accessing elements Attributes, properties and methods Events Mouse events Keyboard events Focus events Drag events Query string Interactions with Javascript Brython-specific built-in modules
browser
browser.aio browser.ajax browser.html browser.local_storage browser.markdown browser.object_storage browser.session_storage browser.svg browser.template browser.timer browser.webcomponent browser.websocket browser.worker Widgets browser.widgets.dialog browser.widgets.menu interpreter javascript Working with BrythonCookbook |
Brython implements Python version 3, based on the Python Language Reference The implementation takes into account the browsers limitations, in particular those related to the file system. Writing is impossible, and reading is limited to the folders accessible with an Ajax request.Keywords and built-in functionsBrython supports all the keywords and functions of the Python version with the same version number. Here are a few features and limitations imposed by the browser and Javascript :
Standard libraryBrython is shipped with a part of the CPython standard library. Some of the modules that are written in C in CPython standard library have been written in Javascript in Brython distribution (json , math , random ,
re , unicodedata ...).
The xml package is not provided because that of the CPython distribution
uses a C module (pyexpat ) which is available neither in Javascript nor in
pure Python.
Built-in value
The built-in variable |