1

I have dot graph string like

I know I can use node.get_name() or node.get_label() to read name/label.

what methods in the library can I use to read the custom properties like 'schema' or 'page' in the above case?

Posted in pydot github page. No response

"Graph_ID_1" [label="My graph" schema="my_schema" page=2];
}```
pratapan
  • 157
  • 7

1 Answers1

1

The get_attributes on nodes function will give you a dict with all the attributes.

import pydot
n = pydot.Node(my_attr="bar")
print(n.get_attributes()) # -> {'my_attr': 'bar'}
LudvigH
  • 3,662
  • 5
  • 31
  • 49