reading/writing files in windows

Peter Hansen peter at engcorp.com
Mon Jun 9 19:08:14 CEST 2003


sameer wrote:
> 
> I create files in windows using python.  I have tried using \n and
> \r\n as the return character and they both work fine.  It's when I
> move a text file, written by my python program, across a network, open
> the file and save to it that all the text becomes jumbled up, and all
> return characters are lost.  How can I make it so this doesn't happen?

Post example code, and give more details about the way you 
"move a text file" across the network (exactly what command, what
OS, etc, are you using), and explain "jumbled up" in more detail,
and clarify whether by "return characters" you mean ASCII CR (value 13)
or ASCII NL (value 10, as usually represented by \n).

If you read and follow http://www.catb.org/~esr/faqs/smart-questions.html 
it may also help us help you.

-Peter




More information about the Python-list mailing list