How to use [python.execute]

The reference page of python.execute has its arguments, constraints and declaration.

You must provide either code or file.

python.execute
   code:@"
print('hello from python')
"
python.execute
   file:/modules/scripts/hello.py
   args
      .:--name
      .:Magic

Optional arguments:

  • [args] - Either a string of arguments or child nodes (each child is one argument)
  • [stdin] - String passed to stdin
  • [working-directory] - Working directory (must be under /files/)
  • [timeout] - Timeout in seconds (default 30)

Notes:

  • File paths are resolved under /files/ using IRootResolver.
  • Non-zero exit codes throw a Hyperlambda exception with stderr/stdout.