Re: formatting output in rpm-python?

Armijn Hemel <[email protected]> Sat, 17 Jan 2004 18:19:03 +0100
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
On Sat, Jan 17, 2004 at 11:40:58AM -0500, seth vidal wrote:

> > Right, I found the solution (and the `problem' more or less):
> >   tmp = h.dsFromHeader('requirename')
> >     for i in tmp:
> >            print i
> > 
> > gives me tuples like
> > ('textutils', '', 64)
> > which is far more usable for me :)
> 
> What is the preference for using dsFromHeader() instead of grabbing
> REQUIRENAME, REQUIREFLAGS and REQUIREVERSION and zipping them together
> to make, more or less, the same set of things.
> 
> I guess I'm just trying to figure out which methods are the 'preferred
> ones' and why they're preferred.

Simply because I didn't know. This is indeed clearer (not that much
faster though). Now I just have to find out exactly what the numbers in
the `REQUIREFLAGS' stand for. Anybody a clue about this?

thanks,

armijn

-- 
 ---------------------------------------------------------------------------
  [email protected] | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
 ---------------------------------------------------------------------------