[IPython-user] %paste and integer division

Brian Granger ellisonbg@gmail....
Sun Mar 14 12:57:29 CDT 2010


This is a bit odd, but I think the issue is related to autocall.  If
you turn autocall off, you will get a more reasonable behavior:

In [14]: autocall
Automatic calling is: OFF

In [15]: print 2/3
0

In [16]: 2/3
Out[16]: 0

In [17]: %paste
print 2/3
## -- End pasted text --
0

The odd thing is that with trunk, print 2/3 gives 0 as well.

Cheers,

Brian


On Sat, Mar 13, 2010 at 4:21 AM,  <butterw@gmail.com> wrote:
> How can I configure Ipython so that %paste doesn't use integer division ?
>
> In [160]: print 2/3
> --------> print(2/3)
> 0.666666666667
>
>
> Now if I copy the previous statement :
> In [161]: %paste
> 0
>
>
> I'm using iPython pylab 0.10 on win32 with Python 2.6
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com


More information about the IPython-user mailing list