termui/scripts/run_examples.py

17 lines
366 B
Python
Raw Normal View History

2018-09-06 21:00:19 +00:00
#!/usr/bin/env python3
import signal
import sys
from pathlib import Path
from subprocess import call
if __name__ == '__main__':
signal.signal(signal.SIGINT, lambda sig, frame: sys.exit(0))
2018-09-06 21:15:57 +00:00
p = Path('.') / '_examples'
2018-09-06 21:00:19 +00:00
files = p.glob('*.go')
for file in files:
command = f'go run {file}'
print(command)
call(command.split())