Gabriel Genellina said unto the world upon 05/21/2007 07:01 AM:
> En Mon, 21 May 2007 07:42:21 -0300, revuesbio <[EMAIL PROTECTED]>  
> escribió:
> 
>> os.system('"C:\Program Files\GnuWin32\bin\tiff2pdf.exe" -o C:\test.pdf
>> C:\test.TIF')
> 
> \ is used as a escape character in strings.
> Use either \\ or a raw string, that is:
> 
> os.system('"C:\\Program Files\\GnuWin32\\bin\\tiff2pdf.exe" -o  
> C:\\test.pdf C:\\test.TIF')
> os.system(r'"C:\Program Files\GnuWin32\bin\tiff2pdf.exe" -o C:\test.pdf  
> C:\test.TIF')
> 
> (This should be added to the Python FAQ - the most related entry is about  
> raw strings ending in \)

Better still, use / as the path separator. That works fine on both 
windows and *nixes.

Best,

Brian vdB
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to