[IPython-user] from __future__ import division
Harri Pasanen
hpasanen at gmail.com
Fri Dec 16 11:22:05 CST 2005
On 12/16/05, Charlie Moad <cwmoad at gmail.com> wrote:
> Set PYTHONSTARTUP to a file like '/home/username/.pythonrc' and put
> the import in there. Python will execute this file on startup. Could
> possibly break things though.....
>
Tried that already, it doesn't work.
It is only in effect during the execution of startup file, not after.
So if I have init.py:
from __future__ import division
print 3/4
it will print out 0.75, if I do execfile('init.py') or from init
import * or set it to PYTHONSTARTUP, but afterwards it is not in
force.
And I don't see a function interface to turn it on either...
-Harri
More information about the IPython-user
mailing list