Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

[70] Nodes not identified in graph #11

Open
prmtl opened this issue Mar 8, 2015 · 2 comments
Open

[70] Nodes not identified in graph #11

prmtl opened this issue Mar 8, 2015 · 2 comments

Comments

@prmtl
Copy link
Contributor

prmtl commented Mar 8, 2015

Reported by [email protected], 2012-04-09T20:11:41Z

What steps will reproduce the problem?
  1. Create this dot file:
graph condiments {
    ketchup -- mayonnaise -- tartar -- lemon
    ketchup -- bbq
}
  1. 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

@prmtl
Copy link
Contributor Author

prmtl commented Mar 8, 2015

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.

@prmtl
Copy link
Contributor Author

prmtl commented Mar 8, 2015

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant