在Python中输出当前文件名和行号
在Python中输出当前文件名和行号
用 inspect 库
info = inspect.currentframe()
print('DEBUG!! ',info.f_code.co_filename,info.f_lineno)
IPython.embed()
人工智障与神经病网络
https://www.cnblogs.com/JiangOil/
在Python中输出当前文件名和行号
用 inspect 库
info = inspect.currentframe()
print('DEBUG!! ',info.f_code.co_filename,info.f_lineno)
IPython.embed()