15 lines
323 B
Python
15 lines
323 B
Python
#!/usr/bin/python3
|
|
|
|
from os import listdir
|
|
from os.path import isdir, isfile
|
|
from subprocess import run
|
|
|
|
|
|
for dir in [x for x in listdir('.') if isdir(x)]:
|
|
file = dir + '/' + dir + '.py'
|
|
input = dir + '/input.txt'
|
|
if isfile(file) and isfile(input):
|
|
print(dir, 'result:')
|
|
run(["python3", file])
|
|
|