PluginManager.import_file

PluginManager.import_file(path, module_name=None)[source]

Import a python source file.

This function will load a python source file as a python module. The name of the module can be provided using the module_name parameter.

Parameters
  • path (str) – The full path to the python source file to load.

  • module_name (str) – The module name that the loaded source file should use.

Returns

A python module representing the source file.

Return type

types.ModuleType