Skip to main content

unstdio for inplace manipulation of stdio

Project description

github | PyPi | ReadTheDocs


manipulate stdio

from unstdio.unstdio import Unstdio
from unstdio.handlers import Out
from unstdio.formats import DictFormatter
import io

with Unstdio(stdout=Out(frmt=DictFormatter())) as unstdio:
    print("{Hello World!}")  # out to Unstdio instance
print(isinstance(unstdio.stdout, io.StringIO))
print(unstdio.stdout.getvalue())  # out to system stdout

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

unstdio-0.0.4.tar.gz (2.5 kB view hashes)

Uploaded Source

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