[Zope] Double backslashes in IE

Chris Beaven chris at d-designz.co.nz
Wed Feb 18 18:08:59 EST 2004


Karl, even with raw strings the last character can not be a \.
string.replace(x, '\\\\', '\\') should work better

Horak, Karl wrote:

> Following up on my problem with getting errors in the expression
> _.getitem(file.filename) when using IE, I've learned that IE "sees" the
> filename as something like 'C:\\CSF\\BUS581\\581F203H1BJS.doc'.  The
> double
> backslashes are making it an invalid filename. 
> I've put on my Python thinking cap, figuring I can write a script that
> takes
> care of that.  But string.replace(x, r"\\", r"\") doesn't work.  The raw
> single slash escapes the final double quote and gives an error. 
> Any suggestions?
>  
>



More information about the Zope mailing list