summaryrefslogtreecommitdiffstats
path: root/doc/examples/metaindex.py
blob: 2497e65bf137964ad26b93c965e5ddfebce28fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3

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()