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
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 details)
File details
Details for the file iocapture-0.1.0.tar.gz.
File metadata
- Download URL: iocapture-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f78f5fa0e87b97f874921192257987bdbe591549f8236a33470f61119a3a95e0
|
|
| MD5 |
91603bda4850afe2a9d7f31e9679eb7d
|
|
| BLAKE2b-256 |
ce9e7ba4877cd2cfd0bacaff47940af1fc056c26714138eab29b7c2f2b3a4e77
|