Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superstes/python3_subps
Wrapper script for subprocess usage
https://github.com/superstes/python3_subps
Last synced: 4 days ago
JSON representation
Wrapper script for subprocess usage
- Host: GitHub
- URL: https://github.com/superstes/python3_subps
- Owner: superstes
- License: gpl-3.0
- Created: 2023-01-07T15:31:42.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T18:32:58.000Z (over 1 year ago)
- Last Synced: 2024-04-23T22:37:59.576Z (9 months ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Python3 - SubPS
Wrapper script for subprocess usage.
It only uses builtin modules.
## Install
```bash
python3 -m pip install subps
```See: [PyPI](https://pypi.org/project/subps/)
## Usage
```python3
from subps import process, process_out_err, process_out, process_err, process_rcprocess(cmd='ls -l')
# dict('stdout': 'stdout...', 'stderr': 'stderr...', 'rc': 0)process_out_err(cmd='ls -l')
# tuple('stdout...', 'stderr...')process_out(cmd='ls -l')
# 'stdout...'process_err(cmd='ls -l')
# 'stderr...'process_rc(cmd='ls -l')
# 0
```