Newbie: easy filecopy?

Aahz Maruch aahz at netcom.com
Wed Jun 16 00:39:21 EDT 1999


In article <37665D08.267A697C at phoenix-edv.netzservice.de>,
Holger Jannsen  <holger at phoenix-edv.netzservice.de> wrote:
>
>The problem with 
>f=open(aFile)
>x=f.read()
>f.close
>f.open(toFile)
>f.write(x)
>f.close
>is, that some special ASCII-codes are not copied as usual 
>under Windows-systems, so e.g. CarriageReturn (tested with normal
>Asccii-text).

Open the file in binary mode.
-- 
                      --- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6       <*>      http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

"That doesn't stop me from wanting to work all three of them over with
the clue stick for while, with no safewords allowed."  --abostick




More information about the Python-list mailing list