/usr/share/doc/python-apt/examples/metaindex.py is in python-apt-doc 0.9.3.12.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/python
import apt_pkg
apt_pkg.init()
sources = apt_pkg.SourceList()
sources.read_main_list()
for metaindex in sources.list:
print metaindex
print "uri: ", metaindex.uri
print "dist: ", metaindex.dist
print "index_files: ", "\n".join([str(i) for i in metaindex.index_files])
print
|