hutch_python.utils.find_class¶
- hutch_python.utils.find_class(class_path, check_defaults=True)¶
Find a
typeobject given astr.Given a string class name, either return the matching built-in type or import the correct module and return the type.
- Parameters:
class_path (
str) – Built-in type name or import path e.g.ophyd.device.Devicecheck_defaults (
bool) – IfTrue, try checking inside each module inCLASS_SEARCH_PATH
- Returns:
cls – The class we found
- Return type:
type