summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/sources.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/examples/sources.py b/doc/examples/sources.py
new file mode 100644
index 00000000..79514621
--- /dev/null
+++ b/doc/examples/sources.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+
+import apt_pkg
+
+apt_pkg.init()
+
+sources = apt_pkg.GetPkgSrcRecords()
+while sources.Lookup('hello'):
+ print sources.Package, sources.Version, sources.Maintainer, sources.Section, `sources.Binaries`