summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-09-04 16:28:25 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-09-04 16:28:25 +0200
commit8ad58480ce8a161519339b41eacefc26059bebf7 (patch)
treef0ddb861333b467ecb3cadbc160f6b9bac94ee8b /doc
parent9d88586c37e9a5702949f90fc589ef941d57f661 (diff)
downloadpython-apt-8ad58480ce8a161519339b41eacefc26059bebf7.tar.gz
* python/metaindex.cc:
- added support for the metaIndex objects * python/sourceslist.cc: - support new "List" attribute that returns the list of metaIndex source entries
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/metaindex.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/examples/metaindex.py b/doc/examples/metaindex.py
new file mode 100644
index 00000000..1bce0dba
--- /dev/null
+++ b/doc/examples/metaindex.py
@@ -0,0 +1,15 @@
+
+import apt_pkg
+
+apt_pkg.init()
+
+sources = apt_pkg.GetPkgSourceList()
+sources.ReadMainList()
+
+
+for metaindex in sources.List:
+ print metaindex
+ print "URI: ",metaindex.URI
+ print "Dist: ",metaindex.Dist
+ print "IndexFiles: ","\n".join([str(i) for i in metaindex.IndexFiles])
+ print