diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 14:07:22 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-10-31 14:07:22 +0000 |
commit | f120b5fa5933fef104c1f5e711581455e3980e2e (patch) | |
tree | 10408ce250b47910b385815e3bec96fe1207207c /example.py | |
parent | e703746faad221f6c367e4fe5fd27ebd6b4aae54 (diff) | |
download | python-dmidecode-f120b5fa5933fef104c1f5e711581455e3980e2e.tar.gz python-dmidecode-f120b5fa5933fef104c1f5e711581455e3980e2e.tar.xz python-dmidecode-f120b5fa5933fef104c1f5e711581455e3980e2e.zip |
Implemented reading a dump to - this concludes syncing to the upstream release.
Next, exceptions should be thrown in certain places, more error checking in the
python side of things, and also in relation to setting and unsetting of the
alternate memory file.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@104 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'example.py')
-rwxr-xr-x | example.py | 31 |
1 files changed, 22 insertions, 9 deletions
@@ -1,14 +1,9 @@ #!/usr/bin/env python2.4 import dmidecode import sys +from pprint import pprint -print dmidecode.get_dev() -print dmidecode.set_dev("private/mem-XXX") -print dmidecode.dump() - -print dmidecode.set_dev("private/mem-001") -print dmidecode.get_dev() - +#. Test all functions using /dev/mem... print "*** bios ***\n"; dmidecode.bios() print "*** system ***\n"; dmidecode.system() print "*** system ***\n"; dmidecode.system() @@ -20,9 +15,27 @@ print "*** cache ***\n"; dmidecode.cache() print "*** connector ***\n"; dmidecode.connector() print "*** slot ***\n"; dmidecode.slot() -sys.exit(0) +#. Now test get/set of memory device file... +print dmidecode.get_dev() +print dmidecode.set_dev("private/mem-XXX"); +print dmidecode.get_dev() -from pprint import pprint +#. Test taking a dump... +print dmidecode.dump() + +#. Test reading the dump... +print "*** bios ***\n"; pprint(dmidecode.bios()) +print "*** system ***\n"; pprint(dmidecode.system()) +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()) + +sys.exit(0) print "*** bios ***\n"; pprint(dmidecode.bios()) print "*** system ***\n"; pprint(dmidecode.system()) print "*** baseboard ***\n"; pprint(dmidecode.baseboard()) |