--- id: subprocess-multitee version: "0.2.1" license: unclear license_treatment: unclear maintenance: active --- # subprocess-multitee — A small `tee` function for splitting stdout/stderr in subprocess, and a `subprocess.Popen` convenience wrapper License: unclear · Maintenance: active · Downloads: 88.5K/mo ## What it is and what it does subprocess-multitee solves the standard library's either-or problem: subprocess.Popen forces you to choose between capturing output (stdout=PIPE) or displaying it (stdout=sys.stdout), but not both. This package provides a tee() function that creates a pipe spawning a background thread to read and write to multiple destinations in real-time, plus a Popen subclass that integrates cleanly with the tee primitive. You pass tee() any combination of PIPE, DEVNULL, file objects, or file descriptors as destinations. The library handles the threading and I/O multiplexing, so you can simultaneously capture output, print to the terminal, and log to files—all from a single subprocess invocation. It works with the standard subprocess.run(), call(), check_call(), and check_output() functions via drop-in replacements, or directly with the enhanced Popen class. Use it for: - Run a build or test command (make, pytest) and capture full output while showing progress in real-time on the terminal. - Log subprocess output to a file while simultaneously displaying it to the user, for debugging long-running processes. - Capture output silently (tee to DEVNULL and PIPE) for programmatic inspection without terminal noise. - Multiplex both stdout and stderr to separate log files and the console in a single Popen call. - Integrate subprocess output capture into a training or data pipeline where you need both real-time feedback and recorded logs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Multiplexes subprocess stdout/stderr to multiple destinations simultaneously, letting you capture output to a pipe while also displaying it in real-time or logging to files. Yes. The package solves a genuine subprocess limitation with a clean, composable API, has no dependencies, low install friction, and is actively maintained. The only caveat is verifying the actual license before use—the description mentions MIT but the fact sheet marks it unclear. ## Install pip install subprocess-multitee uv add subprocess-multitee poetry add subprocess-multitee ## Installing subprocess-multitee Before you install: Low friction: pure Python wheel with no runtime dependencies and requires only Python 3.6+. Actively maintained with recent releases. License in practice: License status is unclear—the fact sheet lists no SPDX identifier or raw license text. Verify the actual license before use in proprietary or restricted contexts. Quickstart: from subprocess_multitee import Popen, tee, PIPE import sys proc = Popen(['make'], stdout=tee(PIPE, sys.stdout)) output = proc.stdout.read() proc.wait() Verify before relying: - Actual license terms—the package description states MIT but the fact sheet lists license_treatment as 'unclear' with no SPDX identifier ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 88.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags subprocess output capture and display, tee stdout stderr to multiple destinations, real-time subprocess output logging, capture subprocess output while printing, multiplex subprocess streams, subprocess stdout to file and terminal, subprocess-utilities, process-io [View on SkillFed](https://skillfed.io/packages/subprocess-multitee) · [View on PyPI](https://pypi.org/project/subprocess-multitee/)