[IPython-dev] from __future__ import division
fperez.net at gmail.com
Wed Jun 14 12:57:58 CDT 2006
On 6/12/06, Gaël Varoquaux <gael.varoquaux at normalesup.org> wrote:
> I am using ipython to do some numerical work with pylab. At the beginning
> of each script I have "from __future__ import division". When I use these
> scripts with "ipython -pylab" (calling them with a %run -i foobar"),
> pylab doesn't see this import, and thus the script has bugs. One option
> is to load ipython without the -pylab switch and load pylab afterwards,
> but this is to the cost of the nice non blocking pylab interface.
> Is there a way to make such an import before pylab gets loaded ? If not
> this may be a useful feature (maybe adding a "-division" switch on the
> command line call).
Mmh, I don't see this problem:
In : 1/2
In : cat div.py
from __future__ import division
In : run div.py
What version are you running?
More information about the IPython-dev