Python Script
#
DescriptionThe script block Python Script
can run external Python functions, from .py
files,
so you can develop your own algorithms.
Preqequisite
Python 3.6
or above must be installed.
#
InputThe input is MxN
and your function will be receiving a dictionary as seen below. You can manipulate the
keys of the dictionary but the variable type of each key should remain constant.
#
OutputThe output is KxL
and is the return dictionary from you Python function. An example of some python processing can
be seen below.
#
AttributesAttribute | Value |
---|---|
Name | Python Script |
File Path | |
Function Name | foo |
Timeout (seconds) | 5 |
Channels | 1 |
#
NameName specifies the name of the block.
#
File PathThe filepath is the path to the Python .py
file you want to use.
#
Function NameThe function name is the name of the function you want to run inside your Python script.
#
Timeout (seconds)The timeout parameter determines how long time SAFE will wait for the script to execute.
#
ChannelsChannels specifies the number of input(s)/output(s) the block will have.