[IPython-user] capture output on screen ?

Reckoner reckoner@gmail....
Sat Jan 17 21:35:12 CST 2009


Hi,

I am using ipython version 0 .91 on Windows.

If I do

In [26]: for i in range(10): print i
   ....:
0
1
2
3
4
5
6
7
8
9

Is it possible to capture the printed output which does not appear in
any Out[]? The main thing is that I have other python program I run
from within
iPython that have a lot of print statements that I would like to
capture. I could do this on the command line by doing something like

% python function.py > output.txt

But I was wondering if there was a way to do that from within iPYTHON.

I hope that made sense.

Thanks in advance.


More information about the IPython-user mailing list