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
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...
...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
Add Comment