PyDocs

Nav

Python Runtime Services

set_lazy_imports_filter

sys

function · Added in 3.15
  • set_lazy_imports_filter(filter)
Set the lazy imports filter callback.

The filter is a callable which disables lazy imports when they
would otherwise be enabled. Returns True if the import is still enabled
or False to disable it. The callable is called with:

(importing_module_name, resolved_imported_module_name, [fromlist])

Pass None to clear the filter.
0 Examples
No examples for sys/set_lazy_imports_filter.
See Also
No see-alsos for sys/set_lazy_imports_filter
0 Notes
No notes for set_lazy_imports_filter