RPM-interface/module

Andrew M. Kuchling akuchlin at mems-exchange.org
Thu Dec 30 17:23:16 EST 1999


> Thomas Weholt wrote:
> > Is there a RedHat package interface/module available for Python??

Red Hat actually wrote a Python rpm module for use in their
config. scripts; it's still there in both RH 6.0 and 6.1.  (In fact,
it looks like some functions were added in 6.1...)

>>> import rpm
>>> dir(rpm)
['RPMFILE_CONFIG', 'RPMFILE_DOC', ...]
>>> db=rpm.opendb()

Unfortunately, there are no docstrings, so you're going to have to
grab the source RPM for the module and read through the source.  (If
you do this, consider writing some docs and contributing them to the
www.rpm.org site.)

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
I'm not a metaphysical man. I'm a minister. That's my job.
    -- The minister in THE MYSTERY PLAY





More information about the Python-list mailing list