python-clom:使用 Python 运行 shell 命令的最简单方法。 一个python命令行对象映射器

时间:2024-07-17 18:31:43
【文件属性】:

文件名称:python-clom:使用 Python 运行 shell 命令的最简单方法。 一个python命令行对象映射器

文件大小:23KB

文件格式:ZIP

更新时间:2024-07-17 18:31:43

Python

Clom 是一个 Python 命令行对象映射器。 它旨在使命令行交互的生成命令和转义参数更容易。 当与或subprocess一起使用时,它特别有用。 安装 使用pip或easy_install安装。 pip install clom 使用示例 进口: >>> from clom import clom 构建命令: >>> clom.echo("Don't test me") "echo 'Don'\\''t test me'" 用参数扩充: >>> clom.ls.with_opts('-a', '-t', l=True).with_args('~/') "ls -a -t -l '~/'" >>> clom.curl('http://dev.host', X='POST', data='message=hello') 'curl -X POST --data=message=h


【文件预览】:
python-clom-develop
----setup.py(2KB)
----.gitignore(43B)
----requirements.d()
--------test.txt(68B)
--------rtd.txt(42B)
----Makefile(45B)
----src()
--------clom()
--------tests()
----.travis.yml(171B)
----MANIFEST.in(74B)
----fabfile.py(1KB)
----runtests(21B)
----LICENSE(1KB)
----README.rst(3KB)
----VERSION.txt(8B)
----pytest.ini(85B)
----docs()
--------Makefile(4KB)
--------api.rst(1KB)
--------index.rst(3KB)
--------conf.py(7KB)

网友评论