Popular recipes by Brian Quinlan http://code.activestate.com/recipes/users/118989/2006-08-10T11:55:25-07:00ActiveState Code RecipesGroup iterator into n-tuples with None padding (Python) 2006-08-10T11:55:25-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/496958-group-iterator-into-n-tuples-with-none-padding/ <p style="color: grey"> Python recipe 496958 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). </p> <p>Groups the elements returned by an iterator into n-tuples. The final tuple may be padded with Nones.</p> Windows shortcuts import hook (Python) 2006-05-10T02:57:05-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/496692-windows-shortcuts-import-hook/ <p style="color: grey"> Python recipe 496692 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>This simple import hook can resolve Windows shortcuts refering to directories. This allows Windows users to simulate UNIX directory structures which contain symlinks.</p> Group a list into sequential n-tuples (Python) 2004-09-02T01:40:58-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/303060-group-a-list-into-sequential-n-tuples/ <p style="color: grey"> Python recipe 303060 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). </p> <p>This function returns a list of n-tuples from a single "flat" list.</p> Remove whitespace-only text nodes from an XML DOM (Python) 2004-09-13T16:00:48-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/303061-remove-whitespace-only-text-nodes-from-an-xml-dom/ <p style="color: grey"> Python recipe 303061 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/xml/">xml</a>). Revision 2. </p> <p>XML parsers consider several conditions when deciding which whitespace-only text nodes should be preserved during DOM construction. Unfortunately, those conditions are controlled by the document's DTD or by the content of document itself. Since it is often difficult to modify the DTD or the XML, this recipe simple removes all whitespace-only text nodes from a DOM node.</p> Gather detailed system information on Mac OS X (Python) 2004-09-02T02:41:40-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/303063-gather-detailed-system-information-on-mac-os-x/ <p style="color: grey"> Python recipe 303063 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>This recipe uses the system_profiler application to retrieve detailed information about a Mac OS X system. There are two useful ways to use it: the first is to ask for a complete Python datastructure containing information about the system (see OSXSystemProfiler.all()) and the other is two ask for particular keys in the system information database.</p> IronPython fade-in window (Python) 2004-09-02T01:58:08-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/303062-ironpython-fade-in-window/ <p style="color: grey"> Python recipe 303062 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/ui/">ui</a>). </p> <p>This recipe describes how to create a fade-in window using IronPython. Several applications use fade-in windows for temporary data e.g. new Outlook XP mail messages are shown through a fade-in/fade-out pop-up window.</p> <p>Fading in can be best accomplished using the Form.Opacity property and a Timer. Pop-up windows should also set the "topmost" window style.</p> A simple XML-RPC server (Python) 2001-10-13T11:34:19-07:00Brian Quinlanhttp://code.activestate.com/recipes/users/118989/http://code.activestate.com/recipes/81549-a-simple-xml-rpc-server/ <p style="color: grey"> Python recipe 81549 by <a href="/recipes/users/118989/">Brian Quinlan</a> (<a href="/recipes/tags/web/">web</a>). </p> <p>This recipe demonstrates the creation of a simple XML-RPC server using the SimpleXMLRPCServer class. It requires either Python 2.2 or later or the XML-RPC package from PythonWare (<a href="http://www.pythonware.com/products/xmlrpc/index.htm" rel="nofollow">http://www.pythonware.com/products/xmlrpc/index.htm</a>) to run.</p>