flib.base.stack module

Call stack helper functions.

get_caller_module() → module

Get reference to callers module.

get_caller_module_name(frame: int = 0) → str

Get name of module, which calls this function.

Parameters:frame – Frame index relative to the current frame in the callstack, which is identified with 0. Negative values consecutively identify previous modules within the callstack. Default: 0
Returns:String with name of module.
get_caller_name(frame: int = 0) → str

Get name of the callable, which calls this function.

Parameters:frame – Frame index relative to the current frame in the callstack, which is identified with 0. Negative values consecutively identify previous modules within the callstack. Default: 0
Returns:String with name of the caller.