Please note:The SCons wiki is in read-only mode due to ongoing spam/DoS issues. Also, new account creation is currently disabled. We are looking into alternative wiki hosts.

Analyzing source trees, based on dependency graphs


While trying to get a deeper understanding for the source of SCons, I actually wanted to see the classes and their dependencies. Googling around I found these two tools that could produce DOT graph files for class or import dependencies from Python source trees:


Having both applications installed, I called

sfood -i . | sfood-graph >

pyreverse -p scons -k .

with the SCons source directory as current folder.

Unfortunately, the resulting graphs were pretty large and visualizing them via the dot tool did not help. PNG, PS or SVG output, the images got too large and the layout of the nodes and edges left a lot to desire.

Then I remembered the yEd Graph Editor (, a great application that can layout and handle even very large datasets...if you find a way to get the data inside. Since it does not import DOT files (yet), I wrote the little converter script ( that outputs yEd's native file format Graphml (XML).

Now looking at complicated DOT graphs is a snap...have a try!


The following files were created with the sources for SCons 1.2.0.d20090223 and Waf 1.5.8, they are all available in two versions:

  1. The nodes contain not only the class names, but also methods/attributes ("_fc" suffix) and
  2. class names only (no special suffix).

Graphml files (XML) with dependencies that can be read directly by yEd:

The original DOT files:


SCons classes



Waf classes



SCons packages


Waf packages


VisualizeDependencies (last edited 2009-08-18 22:21:37 by DirkBaechle)