Skip to main content

run command

Project description


$ [sudo] pip install runcmd


  • minimalist design
  • easy debug


>>> import runcmd
>>> r =["echo", "hello world"])

>>> r.code, r.out, r.err
(0, 'hello world', '')

_raise() - raise exception if code is not 0

>>>["ls"])._raise()             # code 0, ok
>>>["mkdir", "/"])._raise()      # code 1, error
OSError: exited with code 1
mkdir: /: Is a directory

ok - True if code is 0

>>> if r.ok:

text - out+err

>>> r.text

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

runcmd-0.0.2.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

runcmd-0.0.2-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 2 Python 3

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