Created
June 19, 2021 13:55
-
-
Save MAGANER/cae6938401099ec2d2fc144d1f8812ba to your computer and use it in GitHub Desktop.
i got different projects in c++, so i always need to type application name and then call, so instead i run this script in build directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import listdir, system | |
import pathlib | |
data = listdir(pathlib.Path().absolute()) | |
data = list(filter(lambda n: n[len(n)-4:] == ".exe",data)) | |
if len(data) != 1: | |
print("can not find what to run") | |
else: | |
programm = data[0] | |
system(programm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment