Popular recipes by Dave Bailey http://code.activestate.com/recipes/users/4168479/2012-12-24T04:11:35-08:00ActiveState Code RecipesPrint Logger Internals (Python) 2012-12-24T04:11:35-08:00Dave Baileyhttp://code.activestate.com/recipes/users/4168479/http://code.activestate.com/recipes/578389-print-logger-internals/ <p style="color: grey"> Python recipe 578389 by <a href="/recipes/users/4168479/">Dave Bailey</a> (<a href="/recipes/tags/logging/">logging</a>). </p> <p>This helper function simplifies the difficult task of setting up and maintaining a logging system. Changes to a logging system can cause unanticipated consequences such as lost messages or duplicates. Debugging a logging hierarchy can be a tedious task. This function overrides the internal __repr__ functions of the internal classes and allows a print statement to generate the complete logger hierarchy with its associated internals. It allows easy debugging a logger and allows changes to be easily detected.</p> Unit Conversions Using Decimal (Python) 2011-04-13T06:55:05-07:00Dave Baileyhttp://code.activestate.com/recipes/users/4168479/http://code.activestate.com/recipes/577652-unit-conversions-using-decimal/ <p style="color: grey"> Python recipe 577652 by <a href="/recipes/users/4168479/">Dave Bailey</a> (<a href="/recipes/tags/conversions/">conversions</a>, <a href="/recipes/tags/decimal/">decimal</a>, <a href="/recipes/tags/units/">units</a>). </p> <p>A table driven routine generates a unit conversion module and a doctest file. The generated module uses the Decimal class to create unit conversion classes which uses class properties to perform the conversion. conversion.py supplies the following classes: Distance Area Volumn Time Velocity Acceleration Mass Force Weight Pressure Frequency Power Temperature</p> <p>New classes and additional units can easily be created by adding to the table.</p>