hutch_python.utils.extract_objs¶
- hutch_python.utils.extract_objs(scope=None, skip_hidden=True, stack_offset=0)¶
Return all objects with the
scope.This can be though of as a
*import, and it obeys the__all__keyword functionality.- Parameters:
scope (
module,namespace, orlistof these, optional) – If provided, we’ll import from this object. If omitted, we’ll include all objects that have been loaded by hutch_python and everything in the caller’s global frame.skip_hidden (
bool, optional) – IfTrue, we’ll omit objects with leading underscores.stack_offset (
int, optional) – Ifscopewas not provided, we’ll usestack_offsetto determine which frame is the user’s frame. Leave this at zero if you want the objects in the caller’s frame, and increase it by one for each level up the stack your frame is.
- Returns:
objs – Mapping from name in scope to object
- Return type:
dict