blob: 5970fba0c75beb9d956582d74ee53c492ad1218c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import sys
import os
import subprocess
import platform
def fix_args(args):
just_replace_it = False
for arg in args:
if arg == '--fix-path-sep':
just_replace_it = True
continue
if just_replace_it:
arg = arg.replace('::', os.pathsep)
just_replace_it = False
yield arg
if __name__ == '__main__':
res = list(fix_args(sys.argv[1:]))
if platform.system() == 'Windows':
sys.exit(subprocess.Popen(res).wait())
else:
os.execv(res[0], res)
|