Friday, September 18, 2009

Python - the platform module

# python can gather data about the
#   platform it is running on

import platform

print "This script is running on a %s platform." %(platform.system())
print "machine processor: %s " %(platform.processor())
print "machine name: %s " %(platform.node())

#Output (from my Windows laptop):
##  This script is running on a Windows platform.
##  machine processor: x86 Family 6 Model 15 Stepping 6, GenuineIntel 
##  machine name: LAPPY-LAP

No comments:

Post a Comment