TIFF to PDF
Brian van den Broek
broek at cc.umanitoba.ca
Mon May 21 10:41:18 EDT 2007
Gabriel Genellina said unto the world upon 05/21/2007 10:12 AM:
> 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
> ...
Thanks for the catch then, Gabriel. Windows is but a bitter memory for
me, and / worked in every context in which I ever used it---I didn't
know that the support was only partial.
Best,
Brian vdB
More information about the Python-list
mailing list