code – Tools for representing JavaScript code
class (code, scope=None, \*kwargs*)
Bases:
Raises TypeError if code is not an instance of basestring
( in python 3) or scope is not or an instance of dict.
Scope variables can be set by passing a dictionary as the scope argument or by using keyword arguments. If a variable is set as a keyword argument it will override any setting for that variable in the scope dictionary.