Metadata-Version: 2.1
Name: capture-run
Version: 0.0.0
Summary: A drop-in replacement for `subprocess.run` that captures stdout and stderr while also displaying output live in the console.
License: MIT
Author: Christoph Dörrer
Author-email: d-chris@web.de
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown

# capture-run

A drop-in replacement for `subprocess.run` that captures stdout and stderr while also displaying output live in the console.

## Installation

```cmd
pip install capture-run
```

## Usage

```doctest
>>> from capture_run import run

>>> run("echo $ bytes")
$ bytes
CompletedProcess(args='echo $ bytes', returncode=0, stdout=b'$ bytes\r\n', stderr=b'')

>>> run("echo $ text", text=True)
$ text
CompletedProcess(args='echo $ text', returncode=0, stdout='$ text\n', stderr='')

>>> run("echo $ captured", capture_output=True, encoding="utf-8")
CompletedProcess(args='echo $ captured', returncode=0, stdout='$ captured\n', stderr='')
```

