summaryrefslogtreecommitdiff
path: root/doc/examples/sources.py
blob: c12c6f154819873f50dbefa529becdd6bcdb7be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

import apt_pkg

apt_pkg.init()

#cache = apt_pkg.GetCache()
#sources = apt_pkg.GetPkgSrcRecords(cache)

sources = apt_pkg.GetPkgSrcRecords()
sources.Restart()
while sources.Lookup('hello'):
	print sources.Package, sources.Version, sources.Maintainer, sources.Section, `sources.Binaries`
	print sources.Files
	print sources.Index.ArchiveURI("")