I used the following:
>>> import platform
>>> platform.uname()
('Darwin', 'Matthew-Rankins-MacBook-Pro.local', '10.8.0',
'Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011;
root:xnu-1504.15.3~1/RELEASE_X86_64', 'x86_64', 'i386')
>>>
From the Python platform documentation:
platform.uname()
Fairly portable uname interface. Returns a tuple of strings (system, node, release, version, machine, processor) identifying the underlying platform.
Note that unlike the os.uname()
function this also returns possible processor information as additional tuple entry.
Entries which cannot be determined are set to ''.