How to get the name of a source file and the current function name in runtime?
# get the filename sys._getframe().f_code.co_filename # get the function name sys._getframe().f_code.co_name