ENV:
python: 2.7.5
flask = 0.12.2
flask-cors = 2.0.1
flask-script = 2.0.5
start a python shell:
$ python
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.ceil(3.2)
4.0
the math.ceil
return a float, but when I use flask-script
Shell command to start a python shell, it return an integer:
$ ./bin/python manage.py shell
==========================================
Starting server at 2018-01-06 15:30:14
==========================================
In [1]: import math
In [2]: math.ceil(3.2)
Out[2]: 4
I know math.ceil
of python3 will return a integer, but i used python2, anyone has good idea?
check python version:
In [1]: import sys
In [2]: print (sys.version)
2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]