Skip to main content

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

Metadata

Release files for color-stream 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for color-stream 0.3.1
File Size Uploaded Provenance Actions
color_stream-0.3.1.tar.gz 6.0 kB Without provenance Details for color_stream-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for color-stream 0.3.1
File Interpreter ABI Platform Actions
color_stream-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for color_stream-0.3.1-py2.py3-none-any.whl

Total release size: 10.9 kB

Release files / color_stream-0.3.1.tar.gz

Download URL color_stream-0.3.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c034ef24fbf382ca1f18a30b32cfadba34e574d5809b397385ae5d313c34c4d
BLAKE2b-256 checksum
How to use checksums
9039c4665522e0a8e86da4c6d156fdfc704f67296fd666c19d9a7fcec0de08f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Release files / color_stream-0.3.1-py2.py3-none-any.whl

Download URL color_stream-0.3.1-py2.py3-none-any.whl
Size 4.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ccf77ef92abad3da3d6505462ff8b2a032da889c67bc43c13472dcc3ee6e7b06
BLAKE2b-256 checksum
How to use checksums
90238af3bae3b4be84ea1c5817714f50ea5bb26aac2e671aa07ec1cfb94b69c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Security for color-stream 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page