[IPython-User] paging standard output from code executed from the prompt
Deepak Subburam
dsubburam@gmail....
Fri Feb 18 17:41:45 CST 2011
Hello,
While I understand the use of the "%page <obj>" magic command, I can't
figure out how to page output from "print" statements found in the code
executed from the prompt. Any tips?
For example:
>>> import analyse_data
>>> analyse_data.load('data_file')
>>> analyse_data.print_results()
[code generates lots of standard output via print statements which get
dumped to screen]
If I was doing this from the bash prompt, I can simpy pipe the output to
"less":
For example:
$ analyse_data.py --load data_file --print_results | less
Is there a way to do something similar within ipython? This would be
very useful.
Thanks!
Deepak
More information about the IPython-User
mailing list