From 60eb9d480daa352d7af19ad67e410f384f0e9f74 Mon Sep 17 00:00:00 2001 From: nima Date: Thu, 3 Jul 2008 15:59:08 +0000 Subject: Major changes have been implemented, alas, untested, in hope to move towards a new version of dmi decode where rather than having data just printed to screen in functions, data is passed around, and some data structure is constructed, which is then used to construct the Python list/dicitonary objects. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@10 abc39116-655e-4be6-ad55-d661dc543056 --- example.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'example.py') diff --git a/example.py b/example.py index 33a56ee..bcc33be 100755 --- a/example.py +++ b/example.py @@ -1,6 +1,8 @@ #!/usr/bin/python def l(x): + return x + for k in x.keys(): print " %x"%k, "==>", len(x[k]) return len(x) @@ -8,6 +10,9 @@ def l(x): import dmidecode, time print(dir(dmidecode)) +dmidecode.bios() +print "bios\n", l(dmidecode.bios()) + print "proc\n", l(dmidecode.processor()) print "sys\n", l(dmidecode.system()) print "bios\n", l(dmidecode.bios()) -- cgit