[python-win32] raw string
Tim Roberts
timr at probo.com
Sat Aug 21 03:19:55 CEST 2004
On Fri, 20 Aug 2004 19:53:07 +0530, Anand K Rayudu
<anand.k.rayudu at esi-group.com> wrote:
>Larry Bates wrote:
>
>>The following works for me:
>>
>>a="E:\data\models\neonmodel.dat"
>>a=a.replace("\n","\\n")
>>
>>
>Hi Larry,
>
>Thanks a lot, yes it works fine
>Just wondering if there is a way to replace all special characters, or a
>way to tell python to consider this string as in raw mode.
>
>
THIS IS NOT THE RIGHT WAY TO FIX THIS!
If Larry's code actually helped you, that means the C code is sending
you a file name which contains a newline. THAT IS A BUG IN THE C CODE.
You should not be working around the bug in your Python code. Instead,
you should fix the actual bug, in the COM object that is sending the string.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-win32
mailing list