I guess this has been already solved within the comments of the previous question.
This might fail when the environment variable
HOME_LOCATION
has a trailing backslash.
To handle this
os.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 ..."