python打印详细的异常信息

#!/usr/bin/env python
#coding=utf-8
import traceback  
    
try:
    1/0
except Exception, e:
    print e
    print traceback.format_exc()

  

posted on 2014-07-02 12:05  春之晓者  阅读(509)  评论(0编辑  收藏  举报

导航