获取行号:
def get_file():
print("文件名 :",__file__,sys._getframe().f_lineno)print("函数名: ", sys._getframe().f_code.co_name)print("模块名: ", sys._getframe().f_back.f_code.co_name)
获取行号:
def get_file():
print("文件名 :",__file__,sys._getframe().f_lineno)print("函数名: ", sys._getframe().f_code.co_name)print("模块名: ", sys._getframe().f_back.f_code.co_name)