import os import subprocess if __name__ == '__main__': root = os.path.dirname(__file__) file = os.path.join(root, 'todo') subprocess.run([ 'dot', f'{file}.gv', '-T', 'svg', '-o', f'{file}.svg', ])