for \
        Entry \
    in \
        sorted \
          (
            f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None
          ) \
:
    Patch = (open, 
gzip.GzipFile)[Entry.endswith(".gz")](os.path.join(PatchesDir, Entry), "r")
    ... read from Patch ...
    Patch.close()
#end for

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to