Hi,
In chapter 9, the section on using more than more than one process introduced how to start up new programs using os.spawn family or os.system function.
When I enter the following code (on a windows machine):
Code:
import os, sys
if sys.platform == 'win32':
print 'Running on a windows platform.'
command = "C:\Program Files\CCleaner\ccleaner.exe"
os.system(command)
raw_input('Press enter to exit')
I get the following error:
Code:
Running on a windows platform.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Press enter to exit
This only happens when there is a space in the path (e.g: program files).
Is there a way around this?