Ant wrote:
> 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,
> 
You can write to a new file and create your own line endings.
When done, delete the original file and rename the output file.

-Larry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to