[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to access package information from python



Hi.

Jochen Voss wrote:
> is there an easy way to find the following information from within a
> Python program?
> (1) the dependencies, predependencies, and build-dependencies of a
> specific Debian package,
> (2) a list of all essential packages, and
> (3) a list of all required packages

There is the (terminally ill documented [1]) package python-apt, which provides
a reasonably fast [2] interface to the apt cache.
If you want my pitifuly "dependency tree lister" (something between a python-apt
and a wxtree example with bad style), I can send you that, too.

Cheers

T.

1. Last time I looked, at least not documented in the places I looked.
   I ended up looking up looking at the source code of the python extension.
2. I.e. loops over all packages (looking for the section etc.) are feasible.

Attachment: pgp__uFJtEfMf.pgp
Description: PGP signature


Reply to: