Return a set that represents the edges in the tree.
(t)
| 172 | return modules |
| 173 | |
| 174 | def MakeEdgeList(t): |
| 175 | ''' |
| 176 | Return a set that represents the edges in the tree. |
| 177 | ''' |
| 178 | edgeList = set() |
| 179 | for k, v in t.iteritems(): |
| 180 | subKeys = v.keys() |
| 181 | if subKeys: |
| 182 | for kk in subKeys: |
| 183 | edgeList.add((k, kk)) |
| 184 | edg = MakeEdgeList(v) |
| 185 | if edg: |
| 186 | edgeList.update(edg) |
| 187 | return edgeList |
| 188 | |
| 189 | def MakeGraph(t, parent='', level=0): |
| 190 | ''' |