Quick Search
  1. Dashboard
  2. Projects
  3. Python-DMIDecode
  4. Home
  • Dashboard
  • PSIGMATECK
  • Projects
  • Hackerspace
  • Browse
    • Pages
    • Blog
    • Labels
    • Attachments
    • Bookmarks
    • Mail
    • Advanced
    • Activity
    • Page Approval
    • Confluence Gadgets
  • Log In
  • Sign Up
  • Add
    • Comment
  • Tools
    • Attachments (2)
    • Page History
    • Restrictions
    • Info
    • Link to this Page…
    • View in Hierarchy
    • View Wiki Markup
Python-DMIDecode

Collapse all
Expand all   Collapse all
  • Page restrictions apply
  • Attachments:2
  • Added by Nima Talebi, last edited by Nima Talebi on Apr 12, 2010  (view change)
Comment:
  • Name Size Creation date Last mod
  • GNUv2_small.png 16 kB Apr 04, 2010 Apr 04, 2010 More info
  • logo.png 12 kB Apr 04, 2010 Apr 04, 2010 More info

Home

Python-DMIDecode+XML Extension Module

Mission Statement

Input Alan Cox's infamous dmidecode utility, now maintained and further developed by Jean Delvare
Output A Python module capable to producing XML data, as well as presenting the data in native Python data types.
  • Please note that python-dmimdecode is not dmidecode; consequently the developers and maintainers are different.
  • Having said that, python-dmimdecode shadows * dmidecode*.
    • We will strive to maintain python-dmidecode; as close as possible to the current release of the upstream dmidecode.
  • Please do not email the original dmidecode developers about this python extension module, instead use the mailing list detailed below.

XML-to-Python Mapping

License

Python-DMIDecode is licensed under the GNU GPL v2

Quick Example

Compile the python module (shared object)...

Unknown macro: {code}

make
sudo python -c "import dmidecode; print dmidecode.dmi; print dir(dmidecode)"

...If you get something like this...SMBIOS 2.3 present

Unknown macro: {code}

[
'_doc', 'file', 'name_',
'baseboard', 'bios', 'cache', 'chassis', 'connector', 'dump',
'get_dev', 'memory', 'processor', 'set_dev', 'slot', 'system', 'type'
'dmi', 'version'
]

...you know it's all good.

Here's a sample script...

Unknown macro: {code}

import dmidecode

myDMIVerStr = dmidecode.dmi
myPyDMIDecodeVerStr = dmidecode.version

myBIOS = dmidecode.bios()
mySystem = dmidecode.system()
myBaseboard = dmidecode.baseboard()
myChassis = dmidecode.chassis()
myProcessor = dmidecode.processor()
myMemory = dmidecode.memory()
myCache = dmidecode.cache()
myConnector = dmidecode.connector()
mySlot = dmidecode.slot()

from pprint import pprint
for i in tuple(range(0,42))+(126, 127):
print i,
pprint(dmidecode.type)

Get It

Source

Get the orig.tar.gz, or...

Unknown macro: {code}

git clone git://git.autonomy.net.au/python-dmidecode
git clone http://git.autonomy.net.au/python-dmidecode.git
git clone https://git.autonomy.net.au/python-dmidecode.git

...which includes the Debian-based and RedHat-based build files.

Mailing Lists

Join  dmidecode-devel or read through the dmidecode-devel archives. Remember that you don't need to be a developer to join, testing and user-feedback itself is extremely valuable to the project's overall development.

People who talk code, or are interested in seeing what's happening under the covers are encouraged to also join the dmidecode-commits; this list will inform people of what code is changing as it changes by sending out the commitdiff and log, it should never be emailed directly by people however and all discussions on commits should be continued in  dmidecode-devel.

Credit

Authors

  • Nima Talebi <nima *at autonomy dot net dot au*>
  • David Sommerseth <davids *at redhat dot com*>

Thanks

  • Debian
    • Christoph Haas <haas at debian dot org> - for mentoring me, and supporting the project at Debian.
  • Red Hat
    • Clark Williams <williams at redhat dot com> - for supporting the project at Red Hat (and supplying the Red Hat spec file).
    • Alan Cox - The original author
  • Jean Delvare <khali at linux-fr dot org> (Upstream) - for general advice and help in writing python-dmidecode.

More Thanks

  • Vaughan Whitteron
  • Stephen Darragh
  • Joel Heenan
  • Justin Cook
Labels parameters

Labels

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment


Powered by Atlassian Confluence, a Confluence theme by RefinedWiki