Up: Component summary Component

PythonEvaluate

Executes an Python script.

Variables table1 - table5 are the iterable readers of the input matrices. tableout is a writer object, with tableout.writerow(Dict) function.

See the testcases for further examples.

Version 0.5
Bundle tools
Categories External
Specialties generic
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires python
Source files component.xml pythonevaluate.py
Usage Example with default values

Type parameters (generics)

Inputs

Name Type Mandatory Description
scriptIn PythonSource Optional Python script file
table1 CSV Optional Data matrix 1 (table1)
table2 CSV Optional Data matrix 2 (table2)
table3 CSV Optional Data matrix 3 (table3)
table4 CSV Optional Data matrix 4 (table4)
table5 CSV Optional Data matrix 5 (table5)
var1 INa or Array<INa> (generic) Optional Generic input that may be used for folders, arrays and binaries
var2 INb or Array<INb> (generic) Optional Generic input that may be used for folders, arrays and binaries
var3 INc or Array<INc> (generic) Optional Generic input that may be used for folders, arrays and binaries
inArray Array<INarray> (generic) Optional Input array, iterator named array
folder BinaryFolder Optional Input folder, path is in folder
vararray Array<INarray> (generic) Optional Keys from vararray will be mapped to variables in Python scope with the corresponding string value. Iterator named vararray. The keys here will overwrite any other values and must either be valid python variable names, or otherwise they may be accessed via the vars() dictionary.

Outputs

Name Type Description
table CSV Result matrix, named tableout
outArray Array<OUTarray> (generic) Result array, writer named output_array
out1 OUTa or Array<OUTa> (generic) An optional output that can be used for custom data types. By default this file is empty.
out2 OUTb or Array<OUTb> (generic) An optional output that can be used for custom data types. By default this file is empty.
out3 OUTc or Array<OUTc> (generic) An optional output that can be used for custom data types. By default this file is empty.

Parameters

Name Type Default Description
param0 string "" Value of this parameter will be assigned to param[0] variable
param1 string "" Value of this parameter will be assigned to param[1] variable
param2 string "" Value of this parameter will be assigned to param[2] variable
param3 string "" Value of this parameter will be assigned to param[3] variable
param4 string "" Value of this parameter will be assigned to param[4] variable
param5 string "" Value of this parameter will be assigned to param[5] variable
param6 string "" Value of this parameter will be assigned to param[6] variable
param7 string "" Value of this parameter will be assigned to param[7] variable
param8 string "" Value of this parameter will be assigned to param[8] variable
param9 string "" Value of this parameter will be assigned to param[9] variable
script string "" Python script string. If the input is given, this parameter is ignored.

Test cases

Test case Parameters IN
scriptIn
IN
table1
IN
table2
IN
table3
IN
table4
IN
table5
IN
var1
IN
var2
IN
var3
IN
inArray
IN
folder
IN
vararray
OUT
table
OUT
outArray
OUT
out1
OUT
out2
OUT
out3
case1 properties scriptIn table1 table2 (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) table (missing) out1 out2 out3

param0=42

case2_transpose (missing) scriptIn table1 (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) table (missing) (missing) (missing) (missing)
case3_arrays (missing) scriptIn (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) inArray (missing) (missing) table (missing) (missing) (missing) (missing)
case4_string_record properties scriptIn (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) (missing) out1 (missing) (missing)

param0=cow=moo,cat=meow,number=1,hope=false


Generated 2019-02-08 07:42:19 by Anduril 2.0.0