diff options
Diffstat (limited to 'doc/examples')
| -rwxr-xr-x | doc/examples/records.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/examples/records.py b/doc/examples/records.py new file mode 100755 index 00000000..ef04b555 --- /dev/null +++ b/doc/examples/records.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +import apt + +cache = apt.Cache() + +for pkg in cache: + if not pkg.candidateRecord: + continue + if pkg.candidateRecord.has_key("Task"): + print "Pkg %s is part of '%s'" % (pkg.name, pkg.candidateRecord["Task"].split()) + #print pkg.candidateRecord |
