diff options
Diffstat (limited to 'doc/examples/metaindex.py')
-rw-r--r-- | doc/examples/metaindex.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/examples/metaindex.py b/doc/examples/metaindex.py new file mode 100644 index 0000000..2497e65 --- /dev/null +++ b/doc/examples/metaindex.py @@ -0,0 +1,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() |