Is there a way to find what function called the current function? So for example:
def first(): second() def second(): # print out here what function
import inspect def first(): return second() def second(): return inspect.getouterframes( inspect.currentframe() )[1] first()[3] # 'first'