PythonMonkey   v1.0.1 (dev)
Loading...
Searching...
No Matches
pythonmonkey.helpers Namespace Reference

Functions

 typeof (jsval)
 
 new (ctor)
 
 simpleUncaughtExceptionHandler (loop, context)
 

Variables

dict evalOpts = {'filename': __file__, 'fromPythonFrame': True}
 
 globalThis = pm.eval('globalThis')
 
 pmGlobals = vars(pm)
 
 exports = pm.eval(, evalOpts)
 
 name = exports[index]
 

Function Documentation

◆ new()

pythonmonkey.helpers.new (   ctor)
new function - emits function which wraps JS new operator, emitting a lambda which constructs a new
JS object upon invocation.

◆ simpleUncaughtExceptionHandler()

pythonmonkey.helpers.simpleUncaughtExceptionHandler (   loop,
  context 
)
A simple exception handler for uncaught JS Promise rejections sent to the Python event-loop

See https://docs.python.org/3.11/library/asyncio-eventloop.html#error-handling-api

◆ typeof()

pythonmonkey.helpers.typeof (   jsval)
typeof function - wraps JS typeof operator

Variable Documentation

◆ evalOpts

dict pythonmonkey.helpers.evalOpts = {'filename': __file__, 'fromPythonFrame': True}

◆ exports

pythonmonkey.helpers.exports = pm.eval(, evalOpts)

◆ globalThis

pythonmonkey.helpers.globalThis = pm.eval('globalThis')

◆ name

pythonmonkey.helpers.name = exports[index]

◆ pmGlobals

pythonmonkey.helpers.pmGlobals = vars(pm)