有没有办法在 pydot 中实现这一点?
举个例子:
[输出点文件]
strict graph g{
"A" -> "B";
"B" -> "C";
"C" -> "D";
"D" -> "E";
}
[Python]
print(num.start)
>>> A
print(num.steps)
>>> ["a,b","b,c","c,d","d,e"]
print(num.end)
>>> E
或以下情况:
[输出点文件]
strict graph g{
"A" -> "B";
"B" -> "C";
"C" -> "A";
}
[Python]
if num["A"] == num.loop:
print("[%s] loop detected")%(num["A"])