Introduction

Installation

Frequently asked questions

Syntax, keywords and built-in functions

Standard distribution

import implementation

Browser interface

Brython-specific built-in modules

Working with Brython

Brython for Firefox OS

Cookbook

 

module javascript

The module javascript allows interaction with the objects defined in Javascript programs and libraries present in the same page as the Brython program.

javascript.py2js(src)
Returns the Javascript code generated by Brython from the Python source code src.

javascript.this()
Returns the Brython object matching the value of the Javascript object this. It may be useful when using Javascript frameworks, eg when a callback function uses the value of this.