[python] CPUのエンディアンを調べる方法

pythonで以下を実行。

import sys
print sys.byteorder

ビッグエンディアンなら'big'、リトルエンディアンなら'little'と表示される。