Latest recipes by Maciej Obarski http://code.activestate.com/recipes/users/2559120/new/2006-03-07T04:53:21-08:00ActiveState Code Recipesneat notation for python closures (Python)
2006-03-07T04:53:21-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/474122-neat-notation-for-python-closures/
<p style="color: grey">
Python
recipe 474122
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/programs/">programs</a>).
</p>
<p>Alternative notation for defining closures in python; It avoids packing closure variables into containers by assigning attributes to the inner function.</p>
UrlAppServer (Python)
2006-02-27T13:25:24-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/474094-urlappserver/
<p style="color: grey">
Python
recipe 474094
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/network/">network</a>).
</p>
<p>Very simple way to interact with python via http.</p>
continuator (Python)
2006-01-15T15:26:24-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/466299-continuator/
<p style="color: grey">
Python
recipe 466299
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>).
</p>
<p>Yielding from generator used inside another generator.</p>
simple, cooperative multitasking using generators (Python)
2006-01-16T12:18:27-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/466008-simple-cooperative-multitasking-using-generators/
<p style="color: grey">
Python
recipe 466008
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 3.
</p>
<p>Cooperative multitasking offers an alternative to using threads. It can be harder to use in some cases (blocking IO) but in other it can be much easier (sharing data between tasks). This recipe shows how to use generators to achieve simple, cooperative multitasking, that allows thousends of 'simultaneously' running tasks.</p>
profiling threads (Python)
2006-01-08T14:01:16-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/465831-profiling-threads/
<p style="color: grey">
Python
recipe 465831
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 8.
</p>
<p>This recipe shows how to profile threads in Python by using custom profiler function.</p>
parse and create fixed size binary data (records / structs) (Python)
2005-12-21T11:52:06-08:00Maciej Obarskihttp://code.activestate.com/recipes/users/2559120/http://code.activestate.com/recipes/465219-parse-and-create-fixed-size-binary-data-records-st/
<p style="color: grey">
Python
recipe 465219
by <a href="/recipes/users/2559120/">Maciej Obarski</a>
(<a href="/recipes/tags/database/">database</a>).
</p>
<p>Python's struct library is too low-level for direct usage. This recipe (only 40 lines) shows how it can be turned into more developer-friendly tool.</p>