/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build/scripts/with_pathsep_resolve.py
24 строки
542 B
iaz1607
`build/scripts` ya style --py
30 ноя 2023, 13:12
30 ноя 2023, 13:12
a6ee229
Код
Авторство
О чём код?
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)