summaryrefslogtreecommitdiff
path: root/doc/examples/records.py
blob: ef04b5550b9a2cda1e079ed8abc138237b74b887 (plain)
1
2
3
4
5
6
7
8
9
10
11
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