My code is simply as follows:
file = 'C:\Exe\First Version\filename.exe'
os.system(file)
When I run this program, a Windows error is raised: can't find the file specified.
I found out the problem has to with the whitespace in the middle of "First Version". How could I find a way to circumvent the problem?
P.S.: what if the variable 'file' is being passed as an argument into another function?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…