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

Functions

 repl ()
 
 usage ()
 
 initGlobalThis ()
 
 main ()
 

Variables

 globalThis = pm.eval("globalThis")
 
dict evalOpts = {'filename': __file__, 'fromPythonFrame': True, 'strict': False}
 
 requirePath = list(map(os.path.abspath, os.getenv('PMJS_PATH').split(',')))
 

Function Documentation

◆ initGlobalThis()

pythonmonkey.cli.pmjs.initGlobalThis ( )
Initialize globalThis for pmjs use in the extra-module context (eg -r, -e, -p). This context
needs a require function which resolves modules relative to the current working directory at pmjs
launch. The global require is to the JS function using a trick instead of a JS-wrapped-Python-wrapped function

◆ main()

pythonmonkey.cli.pmjs.main ( )
Main program entry point

◆ repl()

pythonmonkey.cli.pmjs.repl ( )
Start a REPL to evaluate JavaScript code in the extra-module environment. Multi-line statements and
readline history are supported. ^C support is sketchy. Exit the REPL with ^D or ".quit".

◆ usage()

pythonmonkey.cli.pmjs.usage ( )

Variable Documentation

◆ evalOpts

dict pythonmonkey.cli.pmjs.evalOpts = {'filename': __file__, 'fromPythonFrame': True, 'strict': False}

◆ globalThis

pythonmonkey.cli.pmjs.globalThis = pm.eval("globalThis")

◆ requirePath

bool pythonmonkey.cli.pmjs.requirePath = list(map(os.path.abspath, os.getenv('PMJS_PATH').split(',')))