Popular recipes by Fabio Zadrozny http://code.activestate.com/recipes/users/4180406/2015-01-09T10:14:15-08:00ActiveState Code RecipesSystemMutex (Python)
2015-01-09T10:14:15-08:00Fabio Zadroznyhttp://code.activestate.com/recipes/users/4180406/http://code.activestate.com/recipes/578998-systemmutex/
<p style="color: grey">
Python
recipe 578998
by <a href="/recipes/users/4180406/">Fabio Zadrozny</a>
(<a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/filelock/">filelock</a>, <a href="/recipes/tags/lock/">lock</a>, <a href="/recipes/tags/mutex/">mutex</a>).
</p>
<p>This module provides a way to create a mutex which is valid for the system (i.e.: it can be seen by multiple processes).</p>
<p>Note that the mutex is kept until release_mutex() is called or when it's garbage-collected.</p>
Bunch class created from attributes in class (Python)
2011-12-31T18:03:02-08:00Fabio Zadroznyhttp://code.activestate.com/recipes/users/4180406/http://code.activestate.com/recipes/577999-bunch-class-created-from-attributes-in-class/
<p style="color: grey">
Python
recipe 577999
by <a href="/recipes/users/4180406/">Fabio Zadrozny</a>
(<a href="/recipes/tags/attributes/">attributes</a>, <a href="/recipes/tags/bunch/">bunch</a>, <a href="/recipes/tags/metaclass/">metaclass</a>).
Revision 3.
</p>
<p>Provide a way to construct class __init__, __slots__, __eq__, __ne__, __repr__ for the class and makes explicit which attributes each instance will have (and providing defaults).</p>
<p>The __main__ session shows an example of how it should be used.</p>