File: tagfile.py

package info (click to toggle)
python-apt 0.7.7.1%2Bnmu1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,276 kB
  • ctags: 930
  • sloc: cpp: 4,126; python: 3,108; makefile: 52
file content (8 lines) | stat: -rwxr-xr-x 231 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
#!/usr/bin/env python
import apt_pkg

Parse = apt_pkg.ParseTagFile(open("/var/lib/dpkg/status","r"));

while Parse.Step() == 1:
   print Parse.Section.get("Package");
   print apt_pkg.ParseDepends(Parse.Section.get("Depends",""));