diff options
Diffstat (limited to 'doc')
| -rwxr-xr-x | doc/examples/deb_inspect.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/examples/deb_inspect.py b/doc/examples/deb_inspect.py index 4173c196..0befd2bb 100755 --- a/doc/examples/deb_inspect.py +++ b/doc/examples/deb_inspect.py @@ -4,6 +4,7 @@ import apt_pkg import apt_inst import sys +import os.path def Callback(What,Name,Link,Mode,UID,GID,Size,MTime,Major,Minor): """ callback for debExtract """ @@ -35,5 +36,12 @@ if __name__ == "__main__": print apt_pkg.ParseDepends(depends) - - + print "extracting archive" + dir = "/tmp/deb" + os.mkdir(dir) + apt_inst.debExtractArchive(open(file),dir) + def visit(arg, dirname, names): + print "%s/" % dirname + for file in names: + print "\t%s" % file + os.path.walk(dir, visit, None) |
