summaryrefslogtreecommitdiff
path: root/doc/examples/tagfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/tagfile.py')
-rwxr-xr-xdoc/examples/tagfile.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/examples/tagfile.py b/doc/examples/tagfile.py
new file mode 100755
index 00000000..01fed2cc
--- /dev/null
+++ b/doc/examples/tagfile.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+import apt_pkg
+
+Parse = apt_pkg.ParseTagFile(open("apt/lists/_org_ftp.debian.org_ftp_dists_potato_main_binary-i386_Packages","r"));
+
+while Parse.Step() == 1:
+ print Parse.Section.get("Package");
+ print apt_pkg.ParseDepends(Parse.Section.get("Depends",""));