Parameters in Python Scripting
The python scripting engine allows to access and manipulate TIS Parameters. Parameters are kept as dictionary with tracking function in the first argument of the run, simple_main, and main functions.
Most standard python dictionary methods are provided:
Check if parameter name exists
async
def
run(params, in_tables, out_tables, in_files, out_files, misc):
"Parameter name"
in
params
params.has_key(
"Parameter name"
)
Get parameter value
async
def
run(params, in_tables, out_tables, in_files, out_files, misc):
param_value
=
params[
"Parameter name"
]
param_value
=
params.get(
"Parameter name"
,
"Default value"
)
Set parameter value
async
def
run(params, in_tables, out_tables, in_files, out_files, misc):
params[
"Parameter name"
]
=
"New value"
It is not possible to add a parameter, this throws an exception.