From 511326e111d17e6d49f059bcc76b22460b823b7e 2012-06-11 00:47:50 From: MinRK Date: 2012-06-11 00:47:50 Subject: [PATCH] str(CapturedIO) gives stdout --- diff --git a/IPython/utils/io.py b/IPython/utils/io.py index da686f6..ec00a29 100644 --- a/IPython/utils/io.py +++ b/IPython/utils/io.py @@ -331,6 +331,9 @@ class CapturedIO(object): self._stdout = stdout self._stderr = stderr + def __str__(self): + return self.stdout + @property def stdout(self): if not self._stdout: