code
macname@localhost Desktop % cat exce.py import sys def tmp_func(): print(sys._getframe().f_code.co_name) tmp_func() macname@localhost Desktop % python3 exce.py tmp_func macname@localhost Desktop %
code
macname@localhost Desktop % cat exce.py import sys def tmp_func(): print(sys._getframe().f_code.co_name) tmp_func() macname@localhost Desktop % python3 exce.py tmp_func macname@localhost Desktop %