[LWN Logo]

From: Morten Kjeldgaard <mok@imsb.au.dk>
Subject: ANN: Python classes for dealing with RPM files...
Date: Mon, 06 Sep 1999 17:45:37 +0200

I've written some Python classes that gives us access to all the data 
stored in an RPM file or an RPM database entry. The resulting object 
can be treated like a dictionary, with rpm tags as keys.

Find it at:

http://imsb.au.dk/~mok/linux/doc/rpmfile.py

example:

>>> from rpmfile import *
>>> x = RPMdb("python")
>>> x["NAME"]
'python'
>>> x["RELEASE"]
'5'
>>> x["VERSION"]
'1.5.1'
>>> x["REQUIRENAME"]
['ld-linux.so.2', 'libc.so.6', 'libdl.so.2', 'libm.so.6',
'libcrypt.so.1', 
'libgdbm.so.2', 'libncurses.so.4', 'libreadline.so.3',
'libtermcap.so.2', 
'libz.so.1', '/bin/sh', '/usr/bin/env', '/usr/bin/python']

Comments are welcome,

/Morten

---
Morten Kjeldgaard   <mok@imsb.au.dk>             | Phone : +45 89 42 50
26
Institute of Molecular and Structural Biology    | Fax   : +45 86 12 31
78
Aarhus University                                | Home  : +45 86 18 81
80
Gustav Wieds Vej 10 C, DK-8000 Aarhus C, Denmark | icq   : 27224900