debug.py 文件源码

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

项目:qpid-python 作者: apache 项目源码 文件源码
def stackdump(sig, frm):
  code = []
  for threadId, stack in sys._current_frames().items():
    code.append("\n# ThreadID: %s" % threadId)
    for filename, lineno, name, line in traceback.extract_stack(stack):
      code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
      if line:
        code.append("  %s" % (line.strip()))
  print "\n".join(code)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号