From b25b2ca548508cd2beb26f465b7bc5a296592461 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 10 Jun 2009 11:43:56 +0200 Subject: Implemented native libxml2 XML API for dmidecode To use this API, you need to import dmidecodeXML. This is a wrapper class for the internal XML API which has been implemented. In addition, you might also want to import libxml2 as well. dmidecodeXML::QuerySection() Valid section strings can be found in the pymap.xml file, in the tag section. dmidecodeXML::TypeId() Valid values should match the DMI/SMBIOS specification. dmidecodeXML::SetResultType(resultType) Result type can be either dmidecodeXML.DMIXML_NODE or dmidecodeXML.DMIXML_DOC ---------------------------------------------------------- import libxml2 import dmidecodeXML dmixml = dmidecodeXML.dmidecodeXML() section_nodes = dmixml.QuerySection('processor') dmixml.SetResultType(dmidecodeXML.DMIXML_DOC) typeid_doc = dmixml.QueryTypeId(0x10) dmixml.SetResultType(dmidecodeXML.DMIXML_NODE) typeid_doc.saveFormatFileEnc("-", "UTF-8", 1) ---------------------------------------------------------- --- src/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/setup.py') diff --git a/src/setup.py b/src/setup.py index b02bdf0..54b0357 100644 --- a/src/setup.py +++ b/src/setup.py @@ -22,8 +22,8 @@ setup( "src/xmlpythonizer.c" ], include_dirs = [ "/usr/include/libxml2" ], - library_dirs = [ "/home/nima/dev-room/projects/dmidecode" ], - libraries = [ "util", "xml2" ] + library_dirs = [ "/home/nima/dev-room/projects/dmidecode", "/usr/lib64/python2.5/site-packages"], + libraries = [ "util", "xml2", "xml2mod" ] ) ] ) -- cgit