import os import stat import sys import Patch class DebTarHandler: diff = None def __init__(self,fname): self.tarfile = fname self.size = os.stat(fname)[stat.ST_SIZE] def series(self): return Patch.Quilt30PatchSeries(self.tarfile) if __name__ == "__main__": print "DebTarHandler testing" try: dh = DebTarHandler(sys.argv[1]) except IndexError: print "usage: %s "%(sys.argv[0]) sys.exit(1) print "series:" for f,p in dh.series(): print f print p