File: all.py

package info (click to toggle)
pycallgraph 1.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 416 kB
  • sloc: python: 1,925; makefile: 47
file content (19 lines) | stat: -rwxr-xr-x 390 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
"""
Execute all pycallgraph examples in this directory.

"""

from glob import glob
import os


curdir = os.path.dirname(os.path.abspath(__file__))
examples = glob(os.path.join(curdir, '*.py'))
examples.remove(os.path.join(curdir, 'all.py'))
for example in examples:
    print(example)
    try:
        execfile(example)
    except:
        exec(open(example).read())