file locking...

zugnush zugnush at gmail.com
Sun Mar 1 15:24:25 EST 2009


You could do something like this so that  every process will know if
the file "belongs" to it without prior coordination, it  means a lot
of redundant hashing though.

In [36]: import md5

In [37]: pool = 11

In [38]: process = 5

In [39]: [f for f in glob.glob('*') if int(md5.md5(f).hexdigest(),16)
% pool == process ]
Out[39]:



More information about the Python-list mailing list