进程控制——带有I/O重定向的Easy Fork Exec和Pipe
pc的Python项目详细描述
py是子流程之上的一个层。子流程模块支持 一个丰富的api,但对于许多常见的用例来说是笨拙的,即sync/async fork exec、命令替换和流水线,所有这些都很简单 在系统外壳上执行。
我们的目标是使python成为非平凡shell脚本的明智选择。
功能:
- Easy to fork-exec commands, wait or no wait
- Easy to capture stdout/stderr of children (command substitution)
- Easy to express I/O redirections
- Easy to construct pipelines
- Use short names for easy interactive typing
文档位于<;http://github.com/aht/pc.py/>;。
此模块依赖于Python2.6,或子流程可用的位置。 doctests要求/bin/sh通过。在Linux上测试。
这是一个alpha版本。期待虫子。