Popular recipes by Oliver Schoenborn http://code.activestate.com/recipes/users/1458241/2008-02-06T00:13:09-08:00ActiveState Code RecipesTiming various python statements (Python) 2008-02-06T00:13:09-08:00Oliver Schoenbornhttp://code.activestate.com/recipes/users/1458241/http://code.activestate.com/recipes/544297-timing-various-python-statements/ <p style="color: grey"> Python recipe 544297 by <a href="/recipes/users/1458241/">Oliver Schoenborn</a> (<a href="/recipes/tags/programs/">programs</a>). </p> <p>The timeit module (in Python standard library) is handy to find out how fast a statement takes to execute, but not very convenient to compare speed of several equivalent statements: too much typing, need to create a Timer object for each statement, etc, tedious. The timings module provides the times() function to make it super easy to compare several statements in one call.</p> Dependencies graph of a script or module (Python) 2007-11-24T01:27:39-08:00Oliver Schoenbornhttp://code.activestate.com/recipes/users/1458241/http://code.activestate.com/recipes/535136-dependencies-graph-of-a-script-or-module/ <p style="color: grey"> Python recipe 535136 by <a href="/recipes/users/1458241/">Oliver Schoenborn</a> . </p> <p>This is a recipe to generate a diagram of dependencies of a script. It uses Python's modulefinder to get the dependencies, the two scripts available from <a href="http://www.tarind.com/depgraph.html" rel="nofollow">http://www.tarind.com/depgraph.html</a> to generate a dot file, and graphviz to convert the dot file to PNG. It also filters out a lot of noise and facilitates configurability.</p>