reading and writing files

Chris Rebert clp2 at
Wed Aug 24 06:43:41 CEST 2011

On Tue, Aug 23, 2011 at 9:05 PM, Dave Angel <davea at> wrote:
> On 01/-10/-28163 02:59 PM, Adrián Monkas wrote:
>>             print "Abro Archivo Origen"
>>             archivo=open("D:\Boot.txt","r")
> Your filenames are incorrect, since you use the backslash without escaping
> it.  So the source file has a backspace in it.  I'm amazed you don't get an
> error, since it's unlikely you have a file with that kind of name.

Backslash escape sequences only work for lowercase characters:
>>> '\b'
>>> '\B'

But yeah, I don't endorse relying on this.

Just use forward slashes instead of backslashes in paths; Windows
accepts them just fine.


More information about the Python-list mailing list