diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-29 07:09:10 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-29 07:09:10 +0000 |
commit | e308e170fc844c8b4454384873497f52f0d37ae7 (patch) | |
tree | b47d65ba138c7e748f917be66e4bcfd3bc86a14b | |
parent | 8cbb9ffa69310c065247d3f76eac2e7ee9991af7 (diff) | |
download | python-dmidecode-e308e170fc844c8b4454384873497f52f0d37ae7.tar.gz python-dmidecode-e308e170fc844c8b4454384873497f52f0d37ae7.tar.xz python-dmidecode-e308e170fc844c8b4454384873497f52f0d37ae7.zip |
Tested new dmidecode python module with this example file. A real test case
will be implemented sometime in future.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@82 abc39116-655e-4be6-ad55-d661dc543056
-rwxr-xr-x | example.py | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -1,20 +1,23 @@ -#!/usr/bin/env python2.3 +#!/usr/bin/env python2.4 import dmidecode import sys from pprint import pprint -#print "*** bios ***"; pprint(dmidecode.bios()) -#print "*** system ***\n", pprint(dmidecode.system()) -#print "*** baseboard ***\n"; pprint(dmidecode.baseboard()) -#print "*** chassis ***\n"; pprint(dmidecode.chassis()) -#print "*** processor ***\n"; pprint(dmidecode.processor()) +print "*** bios ***"; pprint(dmidecode.bios()) +print "*** system ***\n", pprint(dmidecode.system()) +print "*** baseboard ***\n"; pprint(dmidecode.baseboard()) +print "*** chassis ***\n"; pprint(dmidecode.chassis()) +print "*** processor ***\n"; pprint(dmidecode.processor()) print "*** memory ***\n"; pprint(dmidecode.memory()) -#print "*** cache ***\n"; pprint(dmidecode.cache()) -#print "*** connector ***\n"; pprint(dmidecode.connector()) -#print "*** slot ***\n"; pprint(dmidecode.slot()) -# -#for v in dmidecode.memory().values(): -# if type(v) == dict and v['dmi_type'] == 17: -# print v['data']['Size'], -#print "" +print "*** cache ***\n"; pprint(dmidecode.cache()) +print "*** connector ***\n"; pprint(dmidecode.connector()) +print "*** slot ***\n"; pprint(dmidecode.slot()) -print dmidecode.type('17') +for v in dmidecode.memory().values(): + if type(v) == dict and v['dmi_type'] == 17: + print v['data']['Size'], +print "" + +import time +print dmidecode.type('3') +time.sleep(1) +print dmidecode.type('bios') |