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
Built Distribution
File details
Details for the file subb-1.0.1.tar.gz
.
File metadata
- Download URL: subb-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75414d82c42fe1b426a3b998297737e22317a60002b636f95d9d1528b4ce43dd |
|
MD5 | a5cb1eb70d18a90c21d291d60a266b73 |
|
BLAKE2b-256 | d1f2ec02f04a1482cca10ed7351227f9d2f92071daeeff738378457d62d27e37 |
File details
Details for the file subb-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: subb-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72329f142aa271c2c79428145bd56d2fdc2d45a5ac5fec392d7abafaf83142a5 |
|
MD5 | 9ec335394ad95bbb0f682814d705d59c |
|
BLAKE2b-256 | ddecd1d9192ff81d3274bb8e685bf96c3592b401b776cff4c752b7b75ff9a38d |