| 283 | |
| 284 | |
| 285 | def usage(): |
| 286 | print("""Usage: pmjs [options] [ script.js ] [arguments] |
| 287 | |
| 288 | Options: |
| 289 | - script read from stdin (default if no file name is provided, interactive mode if a tty) |
| 290 | -- indicate the end of node options |
| 291 | -e, --eval=... evaluate script |
| 292 | -h, --help print pnode command line options (currently set) |
| 293 | -i, --interactive always enter the REPL even if stdin does not appear to be a terminal |
| 294 | -p, --print [...] evaluate script and print result |
| 295 | -r, --require... module to preload (option can be repeated) |
| 296 | -v, --version print PythonMonkey version |
| 297 | --use-strict evaluate -e, -p, and REPL code in strict mode |
| 298 | --inspect enable pmdb, a gdb-like JavaScript debugger interface |
| 299 | --wtf enable WTFPythonMonkey, a tool that can detect hanging timers when Ctrl-C is hit |
| 300 | |
| 301 | Environment variables: |
| 302 | TZ specify the timezone configuration |
| 303 | PMJS_PATH ':'-separated list of directories prefixed to the module search path |
| 304 | PMJS_REPL_HISTORY path to the persistent REPL history file""" |
| 305 | ) |
| 306 | |
| 307 | |
| 308 | def initGlobalThis(): |