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 previously compiled Python script and returns as its result any output sent to stdout. A future version of this function will require the session reference ID returned by bBox_PythonCompile.

Besides sending its output to stdout (e.g., using a print statement), you could also retrieve results later with bBox_PythonGetVar, or by pushing values into a FileMaker table with fm.executesql.

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 per call.

––––––––––

bBox Functions

bBox Wiki