TIFF to PDF
Brian van den Broek
broek at cc.umanitoba.ca
Mon May 21 09:53:08 EDT 2007
Gabriel Genellina said unto the world upon 05/21/2007 07:01 AM:
> En Mon, 21 May 2007 07:42:21 -0300, revuesbio <revuesbio at gmail.com>
> 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
More information about the Python-list
mailing list