/usr/share/doc/python-apt/examples/records.py is in python-apt-doc 0.9.3.12.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/env python
import apt
cache = apt.Cache()
for pkg in cache:
if not pkg.candidate.record:
continue
if "Task" in pkg.candidate.record:
print "Pkg %s is part of '%s'" % (
pkg.name, pkg.candidate.record["Task"].split())
#print pkg.candidateRecord
|