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 |
Deploying a Brython applicationThe application can be deployed by uploading the whole directory content on the server. Since version 3.4.0 it is also possible to deploy a Brython application using the same tool as for CPython packages, iepip .
For that, install the CPython Brython package (pip install brython ),
open a console window and in the application directory run:
brython-cli make_distOn first execution, the user is asked to enter required information for a package : its name, version number, etc. This information is stored in a file brython_setup.json that can be edited later. The command creates a subdirectory __dist__ ; it includes the script setup.py that is used to create a package for the application, and to deploy it on the Python Package Index. Users can then install the CPython package by the usual command: pip install <application_name> and install the Brython application in a directory by: python -m <application_name> --install |