Skip to content

Instantly share code, notes, and snippets.

@MAGANER
Created June 19, 2021 13:55
Show Gist options
  • Save MAGANER/cae6938401099ec2d2fc144d1f8812ba to your computer and use it in GitHub Desktop.
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.
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