Arranging a dependency tree

Mike C. Fletcher mcfletch at rogers.com
Thu Aug 12 02:32:05 EDT 2004


Bryan Olson wrote:
...

> If you want an ordering in which each module follows the
> modules on which it depends, you want a 'topological sort' based
> on the depends relation.

There's a module here:
    http://www.vrplumber.com/programming/
which provides two implementations of topological sorting in Python.  
With that, should be a trivial task to do a dependency sort on the OP's 
graph.

HTH,
Mike

________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com




More information about the Python-list mailing list