about Tech, Computer vision and Machine learning



$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures
/usr/bin/python (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386):	Mach-O executable i386


$ ipython
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import sys

In [2]: is_64bits = sys.maxsize > 2**32

In [3]: is_64bits
Out[3]: True

参考:15.16. platform ― 実行中プラットフォームの固有情報を参照する ― Python 2.7ja1 documentation