Popular recipes by eysi http://code.activestate.com/recipes/users/4177096/2012-03-24T14:40:24-07:00ActiveState Code RecipesCreate and apply filters to lists of file paths (Python)
2012-03-20T21:17:26-07:00eysihttp://code.activestate.com/recipes/users/4177096/http://code.activestate.com/recipes/578084-create-and-apply-filters-to-lists-of-file-paths/
<p style="color: grey">
Python
recipe 578084
by <a href="/recipes/users/4177096/">eysi</a>
(<a href="/recipes/tags/blacklist/">blacklist</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/filter/">filter</a>, <a href="/recipes/tags/walk/">walk</a>, <a href="/recipes/tags/whitelist/">whitelist</a>, <a href="/recipes/tags/yield/">yield</a>).
Revision 2.
</p>
<p>An experiment with filtering lists of files, documentation is written directly into the code.</p>
Manage hashes in database files. (Python)
2012-03-24T14:40:24-07:00eysihttp://code.activestate.com/recipes/users/4177096/http://code.activestate.com/recipes/578081-manage-hashes-in-database-files/
<p style="color: grey">
Python
recipe 578081
by <a href="/recipes/users/4177096/">eysi</a>
(<a href="/recipes/tags/caching/">caching</a>, <a href="/recipes/tags/hashes/">hashes</a>).
Revision 4.
</p>
<p>This module can be used to calculate file hashes, store them in a database file
and retrieve them at a later date.</p>
<p>It uses the files modify time stamp to know if it can use the hash stored in
the db or if it has to re-calculate it. So the user will not have to worry
about the hash being incorrect if the file changes in between runs.</p>