PyScribe Python 调试库开源项目

我要开发同款
匿名用户2015年01月04日
69阅读

技术信息

开源地址
https://github.com/alixander/pyscribe
授权协议
MIT

作品详情

PyScribe是一个Pytho库,可通过prit语句进行调试程序更加方便简单和高效。

示例程序:

from pyscribe import pyscribedef mai():    ps = pyscribe.Scriber()    ps.save_logs(True)    x = 5    ps.p(x)    bar = "foo"    for i i xrage(5):        bar += str(i)        ps.iterscribe(bar)    y = "hello"    ps.p(y)    ps.watch(y)    y = "world"    foo = 1234    ps.d(foo)    ps.d(foo, uit="^")    syoyms = {"clerk": "secretary", "studet": "appretice", "groud": "floor"}    ps.p(syoyms)if __ame__ == "__mai__":    mai()

日志:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Log saved at 2014-12-31 22:03:48%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%From lie 9: x is the it 5----------------------------------------bar is the str foo at begiig of for loop at lie 12From lie 14: I iteratio 0, bar chaged to foo0From lie 14: I iteratio 1, bar chaged to foo01From lie 14: I iteratio 2, bar chaged to foo012From lie 14: I iteratio 3, bar chaged to foo0123From lie 14: I iteratio 4, bar chaged to foo01234From lie 17: y is the str helloFrom lie 18: Watchig variable y, curretly str helloFrom lie 20: y chaged to worldFrom lie 23: ----------------------------------------foo is the it 1234----------------------------------------From lie 24: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^foo is the it 1234^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^From lie 27: syoyms is the dict {'clerk': 'secretary', 'studet': 'appretice', 'groud': 'floor'}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Ed of log%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

功能介绍

PyScribe 是一个 Python 库,可通过 print 语句进行调试程序更加方便简单和高效。 示例程序:
from pyscribe import pyscribe

def m...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论