importlib.util.spec_from_loader()

importlib.util.spec_from_loader(name, loader, *, origin=None, is_package=None)

A factory function for creating a ModuleSpec instance based on a loader. The parameters have the same meaning as they do for ModuleSpec. The function uses available loader APIs, such as InspectLoader.is_package(), to fill in any missing information on the spec.

New in version 3.4.

doc_python
2016-10-07 17:34:54
Comments
Leave a Comment

Please login to continue.