Skip to main content

subx: Datastructure SubprocessResult

Project description

https://travis-ci.org/guettli/subx.svg?branch=master

subx: Data structure SubprocessResult - for the Python programming language

https://github.com/guettli/subx

SubprocessResult

This library gives you a data structure called SubprocessResult. It combines stdout, stderr and ret (the exit status).

This is handy if you do “one shut” calling of processes.

Examples

The method call() returns an instance of SubprocessResult.

result = subx.call([‘date’])

Class SubprocessResult

The class SubprocessResult has the following attributes:

  • stdout
  • stderr
  • ret
  • cmd

Additional Features

If available the subprocess32 library gets used. This provides the timeout parameter for Python 2.7.

Not suited for …

This library is not usefull if you want to stream data to or from your subprocess.

Install

Install for usage from pypi:

pip install subx

Development Install on Python2

Install subx for development on Python2:

virtualenv subx-env
cd subx-env
. ./bin/activate
pip install -e git+https://github.com/guettli/subx.git#egg=subx

Development Install on Python3

Install subx for development on Python3:

python3 -m venv subx-py3env
cd subx-py3env
. ./bin/activate
pip install --upgrade pip
pip install -e git+https://github.com/guettli/subx.git#egg=subx

Development Testing

Testing:

pip install -r src/subx/requirements.txt
cd src/subx
pytest # all test ok?
pyCharm src/subx/...
pytest # all test still ok?
.... I am waiting for your pull request :-)

Project details


Download files

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

Files for subx, version 2017.4.0
Filename, size File type Python version Upload date Hashes
Filename, size subx-2017.4.0.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page