[IPython-user] from __future__ import division

Fernando Perez Fernando.Perez at colorado.edu
Mon Dec 19 21:15:21 CST 2005

skip at pobox.com wrote:
>     Fernando> Note that I'm running from SVN, but I doubt that has anything
>     Fernando> to do with this issue.  All I did was put in my ipythonrc file
>     Fernando> the line I mentioned:
>     Fernando> execute exec __IP.compile('from __future__ import 
>     Fernando> division','<input>','single') in __IP.shell.user_ns
> Running 0.6.15 on MacOSX, adding that line does nothing as far as I can
> tell.  How can I tell that IPython processed my ~/.ipython/ipythonrc file?

As I mentioned in the next message, this only works under ipython from SVN, 
not with .15, I'm afraid.  You can tell that your line is processed by putting 
in it something like

execute print "hello Skip"

and this message should appear as ipython starts.

>     Fernando> At any rate, if the solution you posted (-q new) works for
>     Fernando> you, that's great.  I just wanted to clarify that this one
>     Fernando> does work at least on my system, though I'm at a loss to guess
>     Fernando> why it fails for you.
> The -Qnew flag isn't understood by IPython.  Is it possible to support it?

You need to pass it to the ipython starter file, as mentioned by Harri:

On linux/unix you can fix this by changing ipython's first line to:

#!/usr/bin/python2.3 -Qnew



for specifics.




More information about the IPython-user mailing list