logfile.py 文件源码

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

项目:BlenderRobotDesigner 作者: HBPNeurorobotics 项目源码 文件源码
def log_callstack_last(back_trace=False):
    if not back_trace:
        stack = traceback.extract_stack()[:-1]
    else:
        stack = traceback.extract_tb(sys.exc_info()[2])

    message = "empty"

    print("Parsing stack")

    for path, line, func, code in stack:
        print(path,func)
        if func not in BACKTRACE_FILTER_FUNC:
            if func not in BACKTRACE_FILTER_HIDE_CODE:
                file = os.path.split(path)[-1]
                message = "%s:%s" % (file, line)

    return message
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号