write() problem

emile at fenx.com emile at fenx.com
Tue May 9 09:50:24 EDT 2000

This works for me on Win95 and RH6.  Try paring down your
program to a sample case that exhibits the problem and
post that code as an example.

>>> open(r'c:\temp.tst','w+b').write("^h^e^l^l^o^")
>>> open(r'c:\temp.tst').read()

Emile van Sebille
emile at fenx.com

<yosefgold at my-deja.com> wrote in message
news:<8f8sjh$pi2$1 at nnrp1.deja.com>...
> When I open a file (on windows) with open("name",'wb')
> and I write a string that has a caret "^" in it, the caret gets
> replaced by a "\S\".
> Why does this happen and how can I get the caret into the file.
> Thanks,
> Yosef Gold
> yosef at adsc.com
> PS. Please email responses to my email address as I don't always check
> the list
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> -- 
> http://www.python.org/mailman/listinfo/python-list

More information about the Python-list mailing list