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

I am creating an environment similar to Matlab, so I downloaded the latest version of python (x, y) with all the modules that come with it, and downloaded python 3.4.1. Is python (x, y) running the latest version of python? I noticed that the python (x, y) shell does not automatically calculate the math operations in the floats that I am reading is the difference between python 2.x and 3.x. Do I just need to wait for the new version (x, y) or am I missing something here?

+4
source share
3 answers

You can force Python 2 to behave just like Python 3 wrt division with the following command:

from __future__ import division

__future__ . , ( , IPython), python (x, y).

+1

Python , python.org. Python3.

, SciPy (http://www.scipy.org) Sage (http://www.sagemath.org/tour.html). , .

, ipython (http://ipython.org).

Python2, Python3. , -Q . (Do: python --help) :

$ python2.7 -Qnew
Python 2.7.6 (default, Nov 18 2013, 15:12:51) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1/2
0.5
>>> 
$ python2.7
Python 2.7.6 (default, Nov 18 2013, 15:12:51) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1/2
0
>>> 
$ python3.4
Python 3.4.1 (default, May 21 2014, 01:39:38) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1/2
0.5
>>> 
+1

, python (x, y) -distribution Python 3, () :

. , , Python 3.

/ Anaconda (https://www.anaconda.com/). python (x, y) -idea, " ".

0

All Articles