[IPython-user] Problem with ? and ?? in ipython combined with paging
Fernando Perez
fperez.net at gmail.com
Fri Jan 5 14:12:19 CST 2007
On 1/5/07, Tom Denniston <tom.denniston at alum.dartmouth.org> wrote:
> Much of my code contains long descriptive docstring with many tests.
> There is a great feature that I love in ipython where if you have a
> func and you type "func?" it give a pretty colored docstring that is
> incredibly useful. The nagging problem I face is that if the
> docstring is larger than 25 lines then it invokes the python pager and
> the pretty docstring becomes a garbled mess of "ESC[1;31", etc.
> Below is a docstring that works and one that does and the code that
> produced both. I was wondering whether this is a bug in the python
> pager or ipython and if there is anything that can be done.
What pager and platform are you using? If your pager is 'less' under
*nix, you need to configure it with the -r flag so that it correctly
interprets color escapes, as described in the manual:
http://ipython.scipy.org/doc/manual/node3.html#SECTION00033200000000000000
I also added mention of it in the faq:
http://ipython.scipy.org/moin/FAQ
> I've been using IPython for over a year and a half and it is a
> phenomenal tool. Thanks Fernando, et al. for developing something
> really awesome.
Thanks for the kind words, we're all glad it's useful.
Best,
f
More information about the IPython-user
mailing list