3 ms·
Using graphviz for visualizing these things is fast and easy. print('digraph foo {') # adj_list contains tuples of (parent node name, child node name)
by q3k 6y ago
Using graphviz for visualizing these things is fast and easy.
print('digraph foo {')
# adj_list contains tuples of (parent node name, child node name)
for parent, child in adj_list:
print(f'{parent} -> {child}')
print('}')
Redirect that to a file and view with `xdot`, done.
I've done exactly this a few days ago to visualize the Linux build graph: https://q3k.org/u/73839114a0e5ee65002029892a069dd1b645a8f9f0b336e4cc3f622874772960.png https://q3k.org/u/73839114a0e5ee65002029892a069dd1b645a8f9f0...
- wodenokoto 6y agoSweet! It was excactly this kind of advice I was hoping to get. Thank you.