Package pygeodesy :: Module lazily |
[frames] | no frames]

# Module lazily

Lazily import `pygeodesy` modules and attributes, based on lazy_import from Brett Cannon's modutil.

`Lazy import` is supported only for Python 3.7+ and is enabled by default in PyGeodesy 18.11.10+ and later.

To enable `lazy import`, set `env` variable `PYGEODESY_LAZY_IMPORT` to `1`, `2`, `3` or higher prior to `import pygeodesy`. To disable `lazy import`, set `env` variable `PYGEODESY_LAZY_IMPORT` to `0` or an empty string. Use `2` or higher to print a message for each lazily imported module and attribute, similar to `env` variable `PYTHONVERBOSE` showing imports. Using `3` or higher also shows the importing file name and line number.

Note: `Lazy import` applies only to top-level modules of `pygeodesy`. A `lazy import` of a top-level module inherently loads all sub-modules imported by that top-level module.

Version: 21.07.28

Classes
| LazyImportError Raised if `lazy import` is not supported, disabled or failed some other way.

Functions
print_(*args, **nl_nt_prefix_end_file_flush_sep) Python 3-style `print` function. |
printf(fmt, *args, **nl_nt_prefix_end_file_flush_sep) C-style `printf` function. |

Variables
| isLazy = `None` hash(x)

Function Details

### print_ (*args, **nl_nt_prefix_end_file_flush_sep) |
Python 3-style `print` function. Arguments: `args` - Values to be converted to `str` and concatenated (`any` types). `nl=0` - Number of leading blank lines (`int`). `nt=0` - Number of additional , trailing blank lines (`int`). `prefix=NN` - To be inserted before the formatted text (`str`). Note: Python 3+ keyword arguments `end`, `file` and `flush` are silently ignored.

### printf (fmt, *args, **nl_nt_prefix_end_file_flush_sep) |
C-style `printf` function. Arguments: `fmt` - C-style formating text (`str`). `args` - Values to be formatted (`any` types). `nl=0` - Number of leading blank lines (`int`). `nt=0` - Number of additional , trailing blank lines (`int`). `prefix=NN` - To be inserted before the formatted text (`str`). Note: Python 3+ keyword arguments `end`, `file`, `flush` and `sep` are silently ignored.