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.27.6 python_import

Syntax:
python_import ( string_expression )
Type:
pyobject
Purpose:
Imports python module (given as a string) in the context.
Example:
 
  LIB("pyobject.so");
==> no pyobject support
  python_import("os");
==>    ? `python_import` is not defined
==>    ? error occurred in or before ./examples/python_import.sing line 2: ` \
    python_import("os");`
  name;                         // e. g. 'posix'
==>    ? `name` is undefined
==>    ? error occurred in or before ./examples/python_import.sing line 3: ` \
    name;                         // e. g. 'posix'`
  sep;                          // pathname separator
==>    ? `sep` is undefined
==>    ? error occurred in or before ./examples/python_import.sing line 4: ` \
    sep;                          // pathname separator`
  linesep;                      // end of line marker
==>    ? `linesep` is undefined
==>    ? error occurred in or before ./examples/python_import.sing line 5: ` \
    linesep;                      // end of line marker`

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
            User manual for Singular version 4.3.2, 2023, generated by texi2html.