在Python中输出当前文件名和行号
用 inspect 库
info = inspect.currentframe() print('DEBUG!! ',info.f_code.co_filename,info.f_lineno) IPython.embed()
在Python中输出当前文件名和行号
用 inspect 库
info = inspect.currentframe() print('DEBUG!! ',info.f_code.co_filename,info.f_lineno) IPython.embed()
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。