Skip to main content

process control -- easy fork-exec and pipe with I/O redirection

Project description

Design goals:

  • 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

In effect, make Python a sane alternative to non-trivial shell scripts.

Technically, pc.py is a layer on top of subprocess. The subprocess module support a rich API but is clumsy for many common use cases, namely sync/async fork-exec, command substitution and pipelining, all of which is trivial to do on system shells.

Documentation is at <http://github.com/aht/pc.py/>.

This module depends on Python 2.6, or where subprocess is available. Doctests require /bin/sh to pass. Tested on Linux.

This is an alpha release. Some features are unimplemented. Expect bugs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pc-0.0.2.tar.gz (5.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page