bBox_PythonExecute( mode )

Parameters:
   mode:
      0 = convert both input and output line endings
      1 = skip conversion of carriage returns (the FileMaker end-of-line marker) to new lines
      2 = skip translation of new lines in shell output to carriage returns
      3 = don't translate input or ouput line endings
      4 = run asynchronously (don't wait for output)

Result:
   The output (stdout) from the Python script executed, or "?" if there was an error.

Error:
   bBox_LastError (-3)

Script Step:
   none

––––––––––

First appeared in: 0.50

Examples in demo file: 30

Compatibility:   Client, macOS, Server, Ubuntu, WebDirect, WPE

––––––––––

Executes the currently cached (compiled) Python bytecode and returns the result of its output. A future version of this function will require the session reference ID returned by bBox_PythonCompile.

This routine executes the Python bytecode compiled by the last call to bBox_PythonCompile., which must of been called at least once before this function is used. Your script can either send its output to stdout (e.g., a print statement), or you can retrieve needed values with bBox_PythonGetVar.

When done with the Python environment, call bBox_PythonFinalize.

If there are uncaught Python exceptions during the execution, a "?" is returned and the bBox_LastError function will return the exception text.

Output is capped at 120 MB.

––––––––––

bBox Functions

bBox Wiki