file=zipfile.ZipFile(sys.argv[1],"r"); for name in file.namelist(): utf8name=name.encode('cp437').decode('cp936') print("Extracting " + utf8name) pathname = os.path.dirname(utf8name) if not os.path.exists(pathname) and pathname!= "": os.makedirs(pathname) data = file.read(name) if not os.path.exists(utf8name): fo = open(utf8name, "wb") fo.write(data) fo.close file.close()