helpers.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Simulator 作者: libsmelt 项目源码 文件源码
def info(type, value, tb):
   if hasattr(sys, 'ps1') or not sys.stderr.isatty() or type != AssertionError:
      # we are in interactive mode or we don't have a tty-like
      # device, so we call the default hook
      sys.__excepthook__(type, value, tb)
   else:
      import traceback, pdb
      # we are NOT in interactive mode, print the exception...
      traceback.print_exception(type, value, tb)
      print
      # ...then start the debugger in post-mortem mode.
      pdb.pm()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号