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

4.26.6 python_import

Syntax:
python_import ( string_expression )
Type:
pyobject
Purpose:
Imports python module (given as a string) in the SINGULAR context.
Example:
 
  LIB("pyobject.so");
  python_import("os");
  name;                         // e. g. 'posix'
==> 'posix'
  sep;                          // pathname separator
==> '/'
  linesep;                      // end of line marker
==> '\n'