[IPython-User] show history without line number

Chao YUE chaoyuejoy@gmail....
Mon Oct 10 16:28:34 CDT 2011


Thanks for Fernando & Benjamin & Thomas.

Yes, I think it's because the version. because I am using 0.10.1



2011/10/10 Fernando Perez <fperez.net@gmail.com>

> Hi,
>
> On Mon, Oct 10, 2011 at 9:42 AM, Chao YUE <chaoyuejoy@gmail.com> wrote:
> > I know how to show history commands, but I just want to get rid of the
> line
> > number that appears on the beginning of the command line... I guess there
> > must be some way to do it...
>
> as Min and Thomas said, that's the default behavior now, in 0.11.  If
> you're on ipython 0.10, simply add '-n':
>
> In [3]: hist
> 1: 3+4
> 2:
> for i in range(3):
>    print i,
>
>
> 3: _ip.magic("hist ")
>
> In [4]: hist -n
> 3+4
> for i in range(3):
>    print i,
>
>
> _ip.magic("hist ")
> _ip.magic("hist -n")
>
>
> We flipped that default around because the 'no numbers' case is
> arguably the more useful one.
>

I agree very much.

>
> In general, for any ipython magic simply use '?' to get more help:
>
> hist?
>

Thanks, very helpful!

>
> will show you the relevant options.
>
> Best,
>
> f
>



-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20111010/e902b44d/attachment.html 


More information about the IPython-User mailing list