只要读,就写,恰到好处
justfile的Python项目详细描述
只要读,就写,恰到好处
- 免费软件:麻省理工学院许可证
JustFile是一个Python库,它提供了一个读、写或追加的函数。在
它是相当直接的前进。不创建文件句柄。没有with-语法。只是从 一条小路。在
示例
>>> from justfile.io import read >>> nginx_content = read('/etc/nginx/nginx.conf') >>> nginx_content [[ Whatever's in /etc/nginx/nginx.conf ]] >>> # But what if it doesn't exist? >>> not_found = read('/file/not/found.txt') >>> not_found None
安装
^{pr2}$您还可以安装开发中版本:
pip install https://gitlab.com/src-r-r/python-justfile/-/archive/master/python-justfile-master.zip
发展
要运行所有测试运行:
python3 -m nose
请注意,要合并来自所有tox环境的覆盖率数据,请执行以下操作:
Windows | ^{pr 5}$ |
---|---|
Other | ^{pr 6}$ |
- 项目
标签: