Created
November 27, 2013 17:42
-
-
Save spiiin/7679944 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
def test(fname): | |
#run | |
p = subprocess.Popen(subprocStringPack%(fname)) | |
p.wait() | |
p = subprocess.Popen(subprocStringUnpack%fname.replace(".bin",".001.cmp.bin")) | |
p.wait() | |
#check | |
outName = fname.replace(".bin",".001.cmp.0000.bin") | |
f1 = open(fname, "rb") | |
d1 = f1.read() | |
f1.close() | |
f2 = open(outName, "rb") | |
d2 = f2.read() | |
f2.close() | |
return d1 == d2 | |
WAY_TO_DUMPS = ".............." | |
ffx = os.listdir(WAY_TO_DUMPS) | |
for fn in ffx: | |
print "Check", fn, | |
print test(os.path.join(WAY_TO_DUMPS, fn)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment