>>> import sys >>> sys.byteorder # May return 'little' or 'big' depending on the machine executing the above.