A problem about File path encode

Kevien Lee ironpythonster at gmail.com
Tue Oct 10 10:32:49 EDT 2006


Hi ,
I agree with the problem caue of the the *escape character,*but when i
folllow
these meth,it still didn't work.
It is so strang that the code work on another computer (OS is WinXP),but
throw
error on mine.Why?plese help me


On 10/10/06, Gabriel Genellina <gagsl-py at yahoo.com.ar> wrote:
>
> At Monday 9/10/2006 22:14, Kevien Lee wrote:
>
> >   There is a problem about File path encode ,when i want to parse
> > an xml file.
> >     xmldoc=minidom.parse("D:\Downloads\1.xml")
> >IOError: [Errno 2] No such file or directory: 'D:\\Downloads\x01.xml'
> >
> >See the red line.the file path"D:\Downloads\1.xml" auto  changed
> >'D:\\Downloads\x01.xml'
> >
> >I think may be the version cause the problem (version2.4) at the
> >beginning,but when i changed the version2.5 ,
>
> *\ is a escape character. Use "D:\\Downloads\\1.xml" or
> r"D:\Downloads\1.xml" or "D:/Downloads/1.xml"
> (I wrote this same message a few hours ago...!)
> *
>
>
> --
> Gabriel Genellina
> Softlab SRL
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061010/32dc9586/attachment.html>


More information about the Python-list mailing list