2018. 9. 5.

How to get caller function name in python

get caller name
import sys

def a():
  print sys._getfrmae(1).f_code.co_name

def b():
  a()

## result
b





Tags: python, blog, flask
September 04, 2018 at 04:14PM
Open in Evernote

댓글 없음:

댓글 쓰기