Skip to main content

Capture stdout, stderr easily.

Project description

.. -*- restructuredtext -*-

.. highlight:: python

.. image:: https://secure.travis-ci.org/oinume/iocapture.png?branch=master

Capture stdout, stderr easily with iocapture.

How to use
==========

With Python >= 2.5 ::

import iocapture

with iocapture.capture() as captured:
print("hello stdout")
print(captured.stdout)
# >>> hello stdout

With Python < 2.5 ::

import iocapture

captured = iocapture.capture()
captured.start()
print("hello stdout")
captured.close()
print(captured.stdout)
# >>> hello stdout

ChangeLog
=========

https://github.com/oinume/blob/master/changes.rst


For developers
==============
Install iocapture in develop mode. ::

$ python setup.py develop

Install following modules for testing. ::

$ pip install -r requirements-dev.txt

Run tests ::

$ py.test tests

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

iocapture-0.1.2.tar.gz (12.6 kB view details)

Uploaded Source

File details

Details for the file iocapture-0.1.2.tar.gz.

File metadata

  • Download URL: iocapture-0.1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iocapture-0.1.2.tar.gz
Algorithm Hash digest
SHA256 86670e1808bcdcd4f70112f43da72ae766f04cd8311d1071ce6e0e0a72e37ee8
MD5 c32650e27e2efa89ac62b88c0a4fe0dc
BLAKE2b-256 7a9ebe3e278cec4f82b771b17a6c539a44d67081adb8042bc765776d77f3ea4a

See more details on using hashes here.

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