Skip to main content

The subprocess extension to run processes.

>>> from subprocess import run

>>> run('uname -r').stdout
3.7.0-7-generic

>>> run('uname -a').status
0

>>> print run('rm not_existing_directory').stderr
rm: cannot remove `not_existing_directory': No such file or directory

>>> print run('ls -la', 'wc -l')
14

To use pipe from the shell.

from subprocess import run
run('grep something', data=run.stdin)
$ ps aux | python script.py

Install

You can install it from PyPi, by simply pip:

$ pip install subprocess.run

to test it, launch python

>>> from subprocess import run

Supported platforms

  • Python2.6

  • Python2.7

  • Python3.3

  • PyPy2.1

Tests

https://travis-ci.org/xando/subprocess.run.png?branch=master
>>> python setup.py test

Download files

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

Source Distribution

subprocess.run-0.0.8.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file subprocess.run-0.0.8.tar.gz.

File metadata

File hashes

Hashes for subprocess.run-0.0.8.tar.gz
Algorithm Hash digest
SHA256 5760270139acc4cc4058184e539f5b613dbe0073d84ee43247c2e0fc5c04db4e
MD5 bbb69faff2cdeeffedb2248ee9da2ac9
BLAKE2b-256 16fcfe70ed1cc117b8351ca40fad918ebb7230e85039d9cd449eebdfc2ebaa81

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page