Это работает по умолчанию на Python3
Python 3.2 (r32:88445, Dec 8 2011, 15:26:51)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> eval("1/3")
0.3333333333333333
Для Python2 вы можете передать -Qnew
в командной строке (что эквивалентно from __future__ import division
$ python -Qnew
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> eval("1/3")
0.3333333333333333