File: run_all.py

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (25 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#  Copyright (c) 2022, Manfred Moitzi
#  License: MIT License
from pathlib import Path
import subprocess
import shlex
import shutil
import sys

PYTHON3 = "python"
POSIX = sys.platform != "win32"
if POSIX:
    PYTHON3 = shutil.which("python3")


def main():
    filepath = Path(__file__)
    for script in filepath.parent.glob("create_*.py"):
        cmd = f"{PYTHON3} {script}"
        print(f'executing: "{cmd}"')
        args = shlex.split(cmd, posix=POSIX)
        subprocess.run(args)


if __name__ == "__main__":
    main()