astra / doc /examples /tagfile.py
Lorenzob's picture
Upload folder using huggingface_hub
859a779 verified
raw
history blame
227 Bytes
#!/usr/bin/python3
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.parse_depends(Parse.section.get("Depends", "")))