Skip to main content

subb is a wrapper for python subprocess module

Project description

subb a nice wrapper for python's subprocess module

I am often using python as a scripting language, now shelling out to external programs is probably the most common thing done by a script. Python has the subprocess module for this task, which has a very general interface. I think it is not very well suitable for a quick script.

That's why I often find myself writing a wrapper object for the submodule process. Now the subb package is supposed to be a general wrapper that would cover most use cases.

The interface

The subb.RunCommand class is exported, The RunCommand.run method runs one process, and waits for it to terminate. Upon completion of the run, you have the following members set: output - standart output, error standard error, status the status.exit_code is the status of the command.

The subb.RunCommand constructor is receiving options for each call to the run method.

See the test for example usages

install it

pip3 install subb

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

subb-1.0.2.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

subb-1.0.2-py3-none-any.whl (4.8 kB view hashes)

Uploaded 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