dbr dbr - 4 months ago 11
Python Question

Possible values from sys.platform?

What are the possible return values from the following command?

import sys
print sys.platform


I know there is a lot of possibilities, so I'm mainly interested in the "main" ones (Windows, Linux, Mac OS)

dbr dbr
Answer

Mac OS X (10.4, 10.5, 10.7, 10.8):

darwin

Linux (2.6 kernel):

linux2

Windows XP 32 bit:

win32

Versions in brackets have been checked - other/newer versions are likely to be the same.

Comments