zomy2000
zomy2000

Reputation: 73

Graphviz .dot output with Tkinter

I have created part of a python program which takes input from user and generates a .dot file to draw a finite automata graph corresponding to certain inputs. The GUI of the program is built on the Tkinter library.

I would like to know if there is a way to convert the .dot file into a PNG file or something I can display in a Tkinter window, as the only way I know of requires explicit commands in CMD:

dot output.dot -Tpng -o image.png

Thank you for your time

Upvotes: 0

Views: 391

Answers (1)

yut23
yut23

Reputation: 3064

You can run arbitrary commands from within Python with subprocess.run().

Upvotes: 2

Related Questions