呼び出し先から発信者情報(どのファイル/どの行)を取得する必要があります。そのためにinpectモジュールを使用できることを学びましたが、正確な方法ではありません。
検査でそれらの情報を取得する方法は?または、情報を取得する他の方法はありますか?
import inspect
print __file__
c=inspect.currentframe()
print c.f_lineno
def hello():
print inspect.stack
?? what file called me in what line?
hello()