Home Online Manual
Top
Back: pyobject related functions
Forward: python_import
FastBack: pyobject operations
FastForward: countedref
Up: pyobject related functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.25.5 python_eval

Syntax:
python_eval ( string_expression )
Type:
pyobject
Purpose:
Evaluates a python expression (given as a string) and returns the result as pyobject.
Example:
 
  LIB("pyobject.so");
  python_eval("17 + 4");
==> 21
  typeof(_);
==> pyobject
  list ll = python_eval("range(10)");