def current_method(): mod = inspect.getmodulename(inspect.stack()[1][1]) func = inspect.stack()[1][3] return mod, func