John Wright | 4 May 2012 14:11
Picon
Favicon

Re: Parsing single debian/control file

Sorry, let's try again with the real mailing list address. :)

On Fri, May 04, 2012 at 05:08:40AM -0700, John Wright wrote:
> Hi Andreas,
> 
> Sorry I didn't get back to you earlier.
> 
> On Wed, Apr 18, 2012 at 09:25:46PM +0200, Andreas Tille wrote:
> > Hi John,
> > 
> > I wonder what might be the proper mailing list to ask questions
> > like this - feel free to quote me fully or in parts in public.
> 
> I have added the package discussion mailing list to Cc.
> 
> > I intend to parse some machine readable files in some team maintained
> > packages.  When trying something like
> > 
> >    ctrl = open('debian/control','r')
> >    for ctrlstanza in deb822.Packages.iter_paragraphs(ctrl):
> >        print ctrlstanza
> > 
> > I get the full text of debian/control (same if I try
> > deb822.Sources.iter_paragraphs instead) - so there is no chance to parse
> > the single paragraphs in the Sources and Binary packages section.  I
> > might be stupid because I'd regard this as a basic use case for
> > python-debian but I did not found a way to approach this.  Any hint how
> > to do this properly?
> 
> The code you have above is correct (though I would generally use
(Continue reading)


Gmane