更新时间:2023-09-10 10:01:28
我想这已经在前一个问题的评论中解决了。 />
当环境变量HOME_LOCATION
有一个尾部反斜杠时,这可能会失败。
要处理这个os.path.join
可以用来处理目录分隔符:
I guess this has been already solved within the comments of the previous question.
This might fail when the environment variableHOME_LOCATION
has a trailing backslash.
To handle thisos.path.join
can be used which takes care of the directory separators:
path = os.environ["LOCATION_HOME"]
os.path.join(path, "binaries\\codeplay.exe")
path + " -testroot ..."