摘要:
打印当前.py文件错误行:import systry: a = [1,2] print a[3]except: s=sys.exc_info() print "Error '%s' happened on line %d" % (s[1],s[2].tb_lineno)打印execfile的打印错误行:try: execfile("tprint.py")except Exception, info: #print info[1] print "Error '%s' happened on line %d" 阅读全文
posted @ 2013-04-29 00:17
vingi_苍月
阅读(2505)
评论(0)
推荐(0)


浙公网安备 33010602011771号