User Tools

Site Tools


transformations:callpython

CALL PYTHON

Category: Workflow / External


Description

The action executes the specified Python script. For more details, read Using Python in EasyMorph.


Capabilities

  • Executing a Python script from an EasyMorph workflow
  • Obtaining the workflow parameters in the Python script
  • Obtaining the input dataset of the "Call Python" action in the Python script
  • Returning a result dataset from the Python script as the action's output
  • Setting workflow status messages from the Python script
  • Monitoring workflow cancellation requests in the script
  • Generating EasyMorph warnings


Action settings

Setting Description
Script*Browse to and select the Python script to run.

* Setting can be specified using a parameter.


Settings settings

Setting Description
Pass the input dataset to scriptSelect to pass the current dataset (as of this action) to the Python script.
ModeChoose how EasyMorph will handle return data (if any). Options: Don't return anything (nothing is returned to EasyMorph), Return output dataset (the returned dataset becomes the new current dataset), or Capture errors and continue (return any script errors and continue the workflow).
Don't auto-run this action as the script has side-effects Select this to manually run this action (if the script can/does affect external resources).


Python settings

Setting Description
Use PythonChoose whether to run the script within a virtual environment (Option: VENV) or not (Option: Default). If VENV is selected, browse to and select the folder it is contained in.
Working directoryChoose the script's working directory. Options: Current project's directory (the folder containing the project's .morph file), Python script's directory (the folder that contains the Python script), or Other* (browse to and select, or create, the work folder).
Arguments*Enter any optional command-line arguments to pass to the script.
StdoutSelect Convert stdout into status messages to display the script's output stream as status messages during the workflow run.

* Setting can be specified using a parameter.


See also

transformations/callpython.txt · Last modified: by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki