File: tagfile.py

package info (click to toggle)
python-apt 0.7.100.1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,748 kB
  • ctags: 1,919
  • sloc: cpp: 8,937; python: 5,750; makefile: 89; sh: 9
file content (8 lines) | stat: -rwxr-xr-x 227 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
#!/usr/bin/env python
import apt_pkg

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

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