OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | List of all members
PythonExpression Struct Reference

#include <PythonExpr.h>

Public Member Functions

Expressions::Result_t operator() (client::function::arguments_t args)
 

Detailed Description

Execute a python script using all given arguments (except for the first being the script name) and return the value of the "result" variable in the python script. Expression arguments can be accessed in the Python script using the vector variable "arguments", like i.e. in file "test.py":

  result = 2.0 * arguments[0]

to double the value passed as second argument to the Python expression. For example the expression

  EXPR="python("test.py", 15.0)";

evaluates to a value of 30.0 (test.py contains the line shown above).

Definition at line 34 of file PythonExpr.h.

Member Function Documentation

Expressions::Result_t PythonExpression::operator() ( client::function::arguments_t  args)
inline

Definition at line 36 of file PythonExpr.h.


The documentation for this struct was generated from the following file: