Skip to main content

capture-run

PyPI - Python Version PyPI - Version PyPI - Downloads PyPI - License GitHub - Pytest GitHub - Release codecov pre-commit


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

Installation

pip install capture-run

Usage

>>> from capture 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='')

Metadata

Release files for capture-run 0.1.0

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

Source distribution (sdist)

Source distribution for capture-run 0.1.0
File Size Uploaded
capture_run-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capture-run 0.1.0
File Interpreter ABI Platform
capture_run-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / capture_run-0.1.0.tar.gz

Download URL capture_run-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5d13469d189a84ece1b79074ac4d45e6cdabf1806a91fe7ef2f6362903460758
BLAKE2b-256 checksum
How to use checksums
ac9751b8d356beb5ed60a526f8ff8c04b8688a3ab2b17788bfffda22c2c183b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.13.3 Linux/6.11.0-1013-azure

Release files / capture_run-0.1.0-py3-none-any.whl

Download URL capture_run-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39107ab4a1f1390e74f0af53db5e747f74cdec1c1d158accf485d012b19abc4a
BLAKE2b-256 checksum
How to use checksums
04172fb7315fc9479ff6991f3f431ff977e705834bc4b06b9758b391b1146c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.13.3 Linux/6.11.0-1013-azure

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.0

2 release files

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