星期三, 四月 26, 2006

Python 异常 处理小tips.

# -*- coding: UTF-8 -*-
import traceback
try:
print 1/0
except Exception,e:
print "异常",e
traceback.print_exc()