IDLE on Windows and Linux

Dan Bishop danb_83 at yahoo.com
Tue Dec 31 16:24:02 EST 2002


Oliver Vecernik <vecernik at aon.at> wrote in message news:<3E11AB3F.5090108 at aon.at>...
> Hi!
> 
> If I write some python code with IDLE on Windows files are saved with 
> CR/LF. If I open them on Linux I can see the \r on every line and I 
> cannot execute such files directly.
> 
> Is there a simple solution for this?

One way is to find the line in the IDLE code that opens the file for
writing, and change "w" to "wb" (i.e., write in binary mode, which
doesn't insert \r).



More information about the Python-list mailing list