Are there any ways to obtain a path of a file corresponding to a function object which is passed to a decorator function?
Finally I need a directory of the file.
def mydec(arg):
def dec_inner(func):
def wrapper(*args, **kwargs):
# how to detect a path where func is defined?
return wrapper
return dec_inner