Eval

The Eval function runs a Python script in eval mode and returns the result to Blockpad. Optionally, values may be passed in as variables within the script.

Different from multi-line Python scripts, eval necessarily runs just a single line and returns a result. See the Python docs on the eval function.

Examples:

See also:


Function

Eval(script)

script

Eval(script, parameters)

script
parameters

You can refer to this function in any formula, macro, module, or other script in Blockpad. You can use either its name or its full path:

  • To refer to it by name, use Eval(...) (make sure the library Library.Scripts.Python is included with Include Libaries)
  • To refer to it by its full path, use Library.Scripts.Python.Eval(...)

 

See also: