blob: 9ac4666c4674ce80de7b87eaf2c8327952dab637 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import sys
import os
import subprocess
if __name__ == '__main__':
pos = sys.argv.index('--')
fname = sys.argv[pos + 1]
cmd = sys.argv[pos + 2 :]
with open(fname, 'r') as f:
args = [x.strip() for x in f]
os.remove(fname)
p = subprocess.Popen(cmd + args, shell=False, stderr=sys.stderr, stdout=sys.stdout)
p.communicate()
sys.exit(p.returncode)
|