File: try-examples.py

package info (click to toggle)
python-graphviz 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 712 kB
  • sloc: python: 1,821; makefile: 13
file content (14 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
# try-examples.py - import graphviz here and run all scripts in the example dir

import os
import io
import glob

import graphviz  # noqa: F401

os.chdir('examples')
for filename in glob.iglob('*.py'):
    with io.open(filename, encoding='utf-8') as fd:
        code = fd.read()
    exec(code)