pytreeThis simple module for the Python programming language allows easy creation, manipulation and searching of rooted trees and directed acyclic graphs, with some support for directed graphs containing cycles.
Development statusThe project is in development phase. Creation and traversal is implemented but not thoroughly debugged. A first go at implementing tree matching is available. The strategy is to build a match tree containing user-supplied predicate functions which are tested on a target tree while respecting the topology of the match tree. It works, but the whole thing is still clunky.
A Python module distribution has not been completed yet. You can obtain the current version of the module in the Source tab.
UpdatesI just realized that defining classes Tree, Graph and the like is too restrictive. The Pythonic way to implement the algorithms is to write functions that manipulate lists [of lists]+, or any sequence type for that matter. It would then be much easier to integrate with any class or built-in type.
Look here soon for iterators, inspectors, filters, searchers, etc. that deal with any nested sequence types.
These details are provided for information only. No information here is legal advice and should not be used as such.