json在文件中支持python的简易调试器。也可以看书。
filelog的Python项目详细描述
文件日志1.0.2
你好。
我是一个简单的调试器,可以打印成文件。我也会读书。以防你需要我。
简单在一定的复杂性之内。安装
pip install filelog
文档
参数:文件名
文件名。将添加扩展名.log
。
默认值:debug
环境名称:READABLE_GLOBAL_VARIABLE_NAME
参数:调试
如果设置为真,则打印正在进行的操作。 默认值:真
参数:json
如果设置为true,它将启用json转换 默认值:真
参数:回调
如果设置(一个函数),函数将使用创建文件的路径执行。 默认值:无
示例
from filelog import Writer, Reader Writer() >> {'allah': 'birdir'} # creates a file called debug.log and saves into >>> {"allah": "birdir"} test = Reader() # reads from debug.log print test >>> {'allah': 'birdir'} # delete callback import os Writer(callback: lambda x: os.remove(x)) >> {'test': 'callback'} # deletes the file