TIFF to PDF

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon May 21 10:12:11 EDT 2007


En Mon, 21 May 2007 10:53:08 -0300, Brian van den Broek  
<broek at cc.umanitoba.ca> escribió:

> 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:
>>
> Better still, use / as the path separator. That works fine on both
> windows and *nixes.

But unfortunately / does not always work, specially for arguments to  
internal commands:

py> os.system("type c:/windows/win.ini")
La sintaxis del comando no es correcta. [invalid syntax]
1
py> os.system(r"type c:\windows\win.ini")
[Compatibility]
_3DPC=0x00400000
_BNOTES=0x224000
...

-- 
Gabriel Genellina




More information about the Python-list mailing list