Skip to main content

iomux

checks tests codecov

IO buffer multiplexer.

import sys

from contextlib import redirect_stdout, redirect_stderr

import iomux


capture = iomux.StringMux()

with redirect_stdout(capture.out), redirect_stderr(capture.err):
    print('aaa')
    print('bbb', file=sys.stderr)
    print('aaa')
    print('bbb', file=sys.stderr)

assert capture.getvalue() == 'aaa\nbbb\naaa\nbbb\n'
assert capture.getvalue('out') == 'aaa\naaa\n'
assert capture.getvalue('err') == 'bbb\nbbb\n'
assert list(capture.values()) == [
    ('out', 'aaa\n'),
    ('err', 'bbb\n'),
    ('out', 'aaa\n'),
    ('err', 'bbb\n'),
]

Release files for iomux 0.2.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 iomux 0.2.0
File Size Uploaded
iomux-0.2.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iomux 0.2.0
File Interpreter ABI Platform
iomux-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / iomux-0.2.0.tar.gz

Download URL iomux-0.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
44b083465a050910688448811f4be2d766628f551ab32380627674e30bc61385
BLAKE2b-256 checksum
How to use checksums
bbc3a1ebfde0267083c6bf5109b87b25a8404a58299077b28a3732c61682ac38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / iomux-0.2.0-py3-none-any.whl

Download URL iomux-0.2.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d09463bff48049bbb27e660f07a5c78e8b954ca5011461bc6f4238ac2047d884
BLAKE2b-256 checksum
How to use checksums
9d00cf93d0d36bde6fb71e2b2d4836e927e9bbd71810b8aa4617f4696750acad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.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