I have following line of code:
tfPath = '\"' + os.environ["ProgramFiles(x86)"] + '\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe\"'
if not os.path.exists(tfPath):
tfPath = 'TF.exe'
cmd_str = '\"' + tfPath + ' checkout ' + '\"Files_to_checkout\"\"'
I tested with the file as described being there, in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe". But my code ALWAYS jumped into the true branch, so it never acknowledged that the file was actually there. What did I do wrong there?
Note, for testing purposes, I did a os.system(cmd_str) with the original tfPath, which worked fine, so the file exists, it could be accessed, but the path.os.exists returns false every time.