can we have a filecmp.cmp() that accept a different buffer size?
skip at pobox.com
Thu Jun 12 18:26:08 CEST 2003
kendear> filecmp.cmp() uses a BUFSIZE of 8k to compare. For files that
kendear> are 500MB, the hard disk is really busy, going back and forth,
kendear> while my 512MB RAM is sitting there, sipping margarita. Can we
kendear> have a version of filecmp.cmp() (and filecmp's other methods)
kendear> that accepts a BUFSIZE, such as 1MB or more?
It's not the perfect solution, but you can bump filecmp.BUFSIZE before
calling filecmp.cmp(), like so:
filecmp.BUFSIZE = 1*1024*1024
foo = filecmp.cmp(f1, f2)
More information about the Python-list