Skip to main content

A python library of subprocess module wrapper.

Project description



A python library of subprocess module wrapper.


Execute a command

from subprocrunner import SubprocessRunner

runner = SubprocessRunner("echo test")
print("command: {:s}".format(runner.command))
print("return code: {:d}".format(
print("stdout: {:s}".format(runner.stdout))

runner = SubprocessRunner("ls __not_exist_dir__")
print("command: {:s}".format(runner.command))
print("return code: {:d}".format(
print("stderr: {:s}".format(runner.stderr))
command: echo test
return code: 0
stdout: test

command: ls __not_exist_dir__
return code: 2
stderr: ls: cannot access '__not_exist_dir__': No such file or directory

Get command history

from subprocrunner import SubprocessRunner

SubprocessRunner.is_save_history = True

SubprocessRunner("echo hoge").run()
SubprocessRunner("echo foo").run()

echo hoge
echo foo


pip install subprocrunner


Python 2.7+ or 3.3+

Test dependencies

Download files

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

Files for subprocrunner, version 0.8.0
Filename, size File type Python version Upload date Hashes
Filename, size subprocrunner-0.8.0-py2.py3-none-any.whl (7.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size subprocrunner-0.8.0.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page