Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding list of edges in graphviz in Python

Is there any way to get list of edges in graphviz in python. In my program I wanted to check whether edge already exist between nodes before adding edge in the directed graph. I couldn't find any function like get_edge() or has_connected() function in grahviz in python. Is there any other way of doing the above mentioned task? Any help would be appreciated.

like image 703
user2293224 Avatar asked Oct 27 '25 12:10

user2293224


1 Answers

if your goal is to avoid duplicates edges, use Digraph(strict=True) or Graph(strict=True)

like image 159
Alexander Ponomarenko Avatar answered Oct 30 '25 01:10

Alexander Ponomarenko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!