47,51d46
< try:
< import pydot
< except:
< pydot = False
<
1063,1100d1057
< # generate output file for 'dot' to display as a pretty graph.
< def outputDot(self, dot):
< if isRoot(self):
< label = "{root|"
< else:
< label = "{%s|" % self._name
<
< if isSimObject(self._base):
< label += '%s|' % self.type
<
< if self._children:
< for c in self._children:
< child = self._children[c]
< if isSimObjectVector(child):
< for obj in child:
< dot.add_edge(pydot.Edge(self.path(), obj.path(), style="bold"))
< else:
< dot.add_edge(pydot.Edge(self.path(), child.path(), style="bold"))
<
< for param in self._params.keys():
< value = self._values.get(param)
< if value != None:
< ini_str_value = self._values[param].ini_str()
< label += '%s = %s\\n' % (param, re.sub(':', '-', ini_str_value))
<
< label += '}'
<
< dot.add_node(pydot.Node(self.path(), shape="Mrecord",label=label))
<
< # recursively dump out children
< for c in self._children:
< child = self._children[c]
< if isSimObjectVector(child):
< for obj in child:
< obj.outputDot(dot)
< else:
< child.outputDot(dot)
<