Need help dealing with spaces in NT paths.

piet at piet at
Tue Nov 16 04:45:02 EST 1999

>>>>> wheineman <wheinemanNOwhSPAM at> (W) writes:

W> Put quotes around the complete path. For example:
W> myExec = "C:\\Program Files\\Trash Can\\compactor.exe"

You probably mean:
myExec = "\"C:\\Program Files\\Trash Can\\compactor.exe\""

or easier:
myExec = r'"C:\Program Files\Trash Can\compactor.exe"'
Piet van Oostrum <piet at>
Private email: Piet.van.Oostrum at

More information about the Python-list mailing list