enhance petri net renderer

This commit is contained in:
Joeri Exelmans 2024-11-21 15:57:14 +01:00
parent 3aec288e37
commit 283cfa7801
3 changed files with 28 additions and 9 deletions

View file

@ -1,5 +1,6 @@
from concrete_syntax.common import indent
import urllib.parse
import webbrowser
def make_url(graphviz_txt: str, engine="dot") -> str:
@ -10,3 +11,7 @@ def make_url(graphviz_txt: str, engine="dot") -> str:
# Keeping this one here just in case:
# return "https://dreampuf.github.io/GraphvizOnline/#"+urllib.parse.quote(graphviz)
def show_graphviz(graphviz_txt: str, engine="dot"):
return webbrowser.open(make_url(graphviz_txt, engine))