pyworkflow.utils.reflection module

This module contains reflection utilities (dynamically load classes, inspect object properties and others)


Try to find possible sub-modules under path. A dictionary will be returned with modules names as keys and the modules objects as values.

pyworkflow.utils.reflection.getSubclasses(BaseClass, inputDict)[source]

Iterate over inputDict and find all subclasses of BaseClass, that will be set in outputDict.

pyworkflow.utils.reflection.getSubclassesFromModules(BaseClass, modules, debug=False)[source]

Find subclasses of BaseClass from a give dict of modules.

pyworkflow.utils.reflection.getSubclassesFromPath(BaseClass, path)[source]

Try to find possible sub-packages under path and find subclasses of BaseClass from them Return a dictionary containing the subclasses.


Returns True if a python module is a folder

pyworkflow.utils.reflection.isSameFunction(function1, function2)[source]

Check if the content of 2 functions is the same. This could be used to check if a method has been overridden or not From