pydot-ng
pydot-ng copied to clipboard
[70] Nodes not identified in graph
Reported by [email protected], 2012-04-09T20:11:41Z
What steps will reproduce the problem?
- Create this dot file:
graph condiments {
ketchup -- mayonnaise -- tartar -- lemon
ketchup -- bbq
}
- Create and run this python script:
impot sys
import pydot
# first arg is the dot file
if len(sys.argv) < 2:
exit()
g = pydot.graph_from_dot_file(sys.argv[1])
print g.get_node_list()
What is the expected output? What do you see instead?
The output is an empty list, I expected a list of nodes (ketchup, bbq, etc.)
What version of the product are you using? On what operating system?
pydot-1.0.28 with Python 2.7.1, OS X
Please provide any additional information below.
From: https://code.google.com/p/pydot/issues/detail?id=70
Comment by [email protected], 2012-04-18T21:54:55Z
+1.
If you have nodes implicitly defined, like:
a; a -> b -> c -> d; c;
Only the "explicitly" defined nodes (the ones given their own lines) will be accessible. It really shouldn't work this way.
Comment by [email protected], 2012-05-07T06:11:37Z
Graphviz uses implicitly defined nodes as well. It would be useful to have a lib acting the same way.