Printing unix Line endings from Windows.

Ant antroy at gmail.com
Mon Dec 4 10:58:55 EST 2006


Hi all,

I've got a problem here which has me stumped. I've got a python script
which does some text processing on some files and writes it back out to
the same file using the fileinput module with inplace set to True.

The script needs to run from Windows, but the files need to be written
with Unix line endings.

Is there any way of doing this without having to post-process the file
in binary mode (a-la the crlf.py script)

Cheers,




More information about the Python-list mailing list