|
PythonMonkey v1.3.0 (dev)
|
Classes | |
| class | bigint |
| class | EvalOptions |
| class | JSArrayIterProxy |
| class | JSArrayProxy |
| class | JSFunctionProxy |
| class | JSMethodProxy |
| class | JSObjectProxy |
| class | JSStringProxy |
| class | SpiderMonkeyError |
Functions | |
| _typing.Any | eval (str code, EvalOptions evalOpts={}) |
| JSObjectProxy | require (str moduleIdentifier) |
| _typing.Callable[..., _typing.Any] | new (JSFunctionProxy ctor) |
| typeof (_typing.Any jsval) | |
| _typing.Awaitable[None] | wait () |
| None | stop () |
| None | runProgramModule (str filename, _typing.List[str] argv, _typing.List[str] extraPaths=[]) |
| bool | isCompilableUnit (str code) |
| None | collect () |
| JSObjectProxy | internalBinding (str namespace) |
Variables | |
| null | |
| globalThis | |
stub file for type hints & documentations for the native module @see https://typing.readthedocs.io/en/latest/source/stubs.html
| None pythonmonkey.pythonmonkey.collect | ( | ) |
Calls the spidermonkey garbage collector
| _typing.Any pythonmonkey.pythonmonkey.eval | ( | str | code, |
| EvalOptions | evalOpts = {} |
||
| ) |
JavaScript evaluator in Python
| JSObjectProxy pythonmonkey.pythonmonkey.internalBinding | ( | str | namespace | ) |
INTERNAL USE ONLY See function declarations in ./builtin_modules/internal-binding.d.ts
| bool pythonmonkey.pythonmonkey.isCompilableUnit | ( | str | code | ) |
Hint if a string might be compilable Javascript without actual evaluation
| _typing.Callable[..., _typing.Any] pythonmonkey.pythonmonkey.new | ( | JSFunctionProxy | ctor | ) |
Wrap the JS new operator, emitting a lambda which constructs a new JS object upon invocation
| JSObjectProxy pythonmonkey.pythonmonkey.require | ( | str | moduleIdentifier | ) |
Return the exports of a CommonJS module identified by `moduleIdentifier`, using standard CommonJS semantics
| None pythonmonkey.pythonmonkey.runProgramModule | ( | str | filename, |
| _typing.List[str] | argv, | ||
| _typing.List[str] | extraPaths = [] |
||
| ) |
Load and evaluate a program (main) module. Program modules must be written in JavaScript.
| None pythonmonkey.pythonmonkey.stop | ( | ) |
Stop all pending asynchronous jobs, and unblock `await pm.wait()`
| pythonmonkey.pythonmonkey.typeof | ( | _typing.Any | jsval | ) |
This is the JS `typeof` operator, wrapped in a function so that it can be used easily from Python.
| _typing.Awaitable[None] pythonmonkey.pythonmonkey.wait | ( | ) |
Block until all asynchronous jobs (Promise/setTimeout/etc.) finish. ```py await pm.wait() ``` This is the event-loop shield that protects the loop from being prematurely terminated.
| pythonmonkey.pythonmonkey.globalThis |
| pythonmonkey.pythonmonkey.null |