Skip to main content

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

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

color_stream-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

color_stream-0.2.0-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file color_stream-0.2.0.tar.gz.

File metadata

  • Download URL: color_stream-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for color_stream-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4197035cf29899ea39541dfa39b5d1fd85a781f194ff4fc521d9c699c90bc3c9
MD5 acce06cd33dee067cb64b9f68dcb1923
BLAKE2b-256 abaa80f46a246e939880954362daa2166e5df32a75ac6357bd09f7bddfbe6e57

See more details on using hashes here.

File details

Details for the file color_stream-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for color_stream-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c791d91543c7ecdba169406fa8490c5373ce04ec49bcd802b5dbf5b20024ee18
MD5 93fe66530731aa75e5fa197395321945
BLAKE2b-256 55b443a8cd1a488dfd8a02f5c96b783614294286663939a3e565901a879d414b

See more details on using hashes here.

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