import_py Function

public function import_py(mod_py, mod_name) result(ierror)

Import a Python module.

Module must be in Python module search path. The search path can be set via the environment variable PYTHONPATH or by manipulating the list of paths retrieved by using get_sys_path.

Arguments

Type IntentOptional AttributesName
type(module_py), intent(out) :: mod_py

The imported module

character(kind=C_CHAR,len=*), intent(in) :: mod_name

Name of the module to import. Name can include dots "."

Return Value integer(kind=C_INT)

Error code, 0 on success.