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