hard disk activity

gene tani gene.tani at gmail.com
Mon Feb 13 14:44:50 EST 2006


VSmirk wrote:
> I'm working primarily on Windows XP, but my solution needs to be cross
> platform.
>
> The problem is that I need more than the fact that a file has been
> modified.  I need to know what has been modified in that file.
>
> I am needing to synchronize the file on a remote folder, and my current
> solution, which simply copies the file if a date comparison or a
> content comparison, becomes a bit unmanageable for very large files.
> Some of the files I'm working with are hundreds of MB in size, or
> larger.
>
> So I need to skip copying a hundred MB file that has had only a few
> bytes changed and instead identify which few bytes have changed and
> where those changes are.  I was thinking having a module that worked
> below the file system level, at the device level, might be a place to
> look for a solution.

Sounds like the diff'g files part is the crux of it, look at sequence
matching libs like (don't know if they'll handle strings this big:

http://docs.python.org/lib/module-difflib.html

for watching files' last-mod flags:
http://www.amk.ca/python/simple/dirwatch.html
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418

http://python-fam.sourceforge.net/

http://pyinotify.sourceforge.net/

(there's a few recipes in the online cookbook, in fact)




More information about the Python-list mailing list