Capture stdout, stderr easily.
Project description
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
For developers
Install tomahawk in develop mode.
$ python setup.py develop
Install following modules for testing.
$ pip install requirements-dev.txt
Run tests
$ py.test tests
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(2.3 kB
view hashes)