Popular recipes by Andrew Moffat http://code.activestate.com/recipes/users/2979564/2007-07-08T11:00:48-07:00ActiveState Code Recipessubscriptable generator (Python) 2007-07-08T11:00:48-07:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/523026-subscriptable-generator/ <p style="color: grey"> Python recipe 523026 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/extending/">extending</a>). Revision 4. </p> <p>let's you define a generator with an internal cache that can be accessed like a list</p> tor socket monkeypatch (Python) 2007-06-21T08:10:06-07:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/521921-tor-socket-monkeypatch/ <p style="color: grey"> Python recipe 521921 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/network/">network</a>). Revision 2. </p> <p>patches socket to tunnel through a tor server either by socks4a or socks5 (tor-resolve required for socks5), being careful not to leak dns requests</p> <p>pyconstruct required, <a href="http://construct.wikispaces.com/" rel="nofollow">http://construct.wikispaces.com/</a></p> xml reverse-engineering ElementTree code generator (*whew*) (Python) 2007-06-13T16:08:19-07:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/521902-xml-reverse-engineering-elementtree-code-generator/ <p style="color: grey"> Python recipe 521902 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/xml/">xml</a>). Revision 2. </p> <p>takes an ambiguous xml file and generates the ET code to generate that xml file. this is useful if you have an example xml file, or an ambiguous xml file that you'd like to use as a template to parameterize certain elements. upgrades coming.</p> lpr-based printer module for *nix (Python) 2007-04-30T06:34:39-07:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/511505-lpr-based-printer-module-for-nix/ <p style="color: grey"> Python recipe 511505 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/text/">text</a>). </p> <p>a very simple printer module for any *nix system that has lpr</p> decorator: suppressable (Python) 2007-02-11T01:16:47-08:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/502212-decorator-suppressable/ <p style="color: grey"> Python recipe 502212 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/programs/">programs</a>). Revision 3. </p> <p>useful for decorating functions/methods that you'd like to disable from the main loop or commandline via optparse. an example would be running certain verifications or checks that you deem unnecessary in certain scenarios</p> threaded pipes (Python) 2006-08-20T14:43:57-07:00Andrew Moffathttp://code.activestate.com/recipes/users/2979564/http://code.activestate.com/recipes/496979-threaded-pipes/ <p style="color: grey"> Python recipe 496979 by <a href="/recipes/users/2979564/">Andrew Moffat</a> (<a href="/recipes/tags/threads/">threads</a>). </p> <p>combines queues and threads for efficient data processing.</p>