Python 3.x on python(x,y)?

Fanylion picture Fanylion · Jul 31, 2014 · Viewed 12.2k times · Source

I'm in the process of setting up a Matlab like environment so I downloaded the latest version of python(x,y) with all the modules that come with it and downloaded python 3.4.1. Does python(x,y) not run the latest version of python? I noticed because the python(x,y) shell doesn't auto calculate mathematical operations into floats which I read is a difference between python 2.x and 3.x. Do I just have to wait for a new release of (x,y) or am I missing something here?

Answer

Roland Smith picture Roland Smith · Jul 31, 2014

You can make Python 2 behave the same as Python 3 w.r.t. division with the following command;

from __future__ import division

Imports from __future__ should be the in the top of the file. There is probably a way to auto-load this expression (I know it is possible in IPython) but I'm not familiar with python(x,y).