A tool to run another shell command, and color the stdout/stderr streams green/red
Project description
color_stream
A quick Python script to run another shell command, and split/color the stdout/stderr streams green/red
Story
While working with redirecting and assessing the output from another CLI tool, I needed a way to see what was going to stderr, and what was going to stdout.
This tool highlights the two streams, in real time.
Usage
pip install color_stream
color_stream '<another command here>'
## OR ##
python3 -m color_stream '<another command here>'
# Test it with the demo script in this repo:
color_stream python demo_1.py
# Test it with "ls" (success, and error with file that doesn't exist):
color_stream ls file_that_exists.txt file_that_does_not_exist.txt
# Print out the total bytes count statistics:
color_stream --stat python demo_1.py
Limitations
- reading from stdin is untested, and likely doesn't work
- throughput speed is currently not benchmarked
- switching colors is not currently supported
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file color_stream-0.3.0.tar.gz.
File metadata
- Download URL: color_stream-0.3.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad8d03fc066168df45b99659a4c03de909257e72cfc33a26393fe38a594f313
|
|
| MD5 |
07dbfed3540c6a99263f352df82a5548
|
|
| BLAKE2b-256 |
f085406a357c276b916e4dd5efa81e2e0d47c11f84fea0c431ff4a6ad1016b4a
|
File details
Details for the file color_stream-0.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: color_stream-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08323b0c9e306ef2dcd8eac503d8485cf7b2d5c832dde9dd5b27e17240349e4e
|
|
| MD5 |
2366645923499489e491bf406beecd3a
|
|
| BLAKE2b-256 |
3fa526c5ea154d5134d16578f50374b1349f83027f0aefe545c60278d221e9b3
|