Sizin probleminizin böyle karizmatik bir python çözümü vardır.
Ama ben şöyle birşey gördüm
http://docs.python.org/release/3.2/library/functions.html#open
Diyor ki
"newline controls how universal newlines works (it only applies to
text mode). It can be None, '', '\n', '\r', and '\r\n'. It works as
follows:

On input, if newline is None, universal newlines mode is enabled.
Lines in the input can end in '\n', '\r', or '\r\n', and these are
translated into '\n' before being returned to the caller. If it is '',
universal newline mode is enabled, but line endings are returned to
the caller untranslated. If it has any of the other legal values,
input lines are only terminated by the given string, and the line
ending is returned to the caller untranslated.
On output, if newline is None, any '\n' characters written are
translated to the system default line separator, os.linesep. If
newline is '', no translation takes place. If newline is any of the
other legal values, any '\n' characters written are translated to the
given string."

Özetlersek Python sizin yerinize \n <-> \n\r dönüşümlerini yapıyor.

2011/12/5 Mucibirahman İLBUĞA <[email protected]>:
> Merhabalar,
> Python ile metin dosyaya satır satır (Dosya.writeln gibi) yazmak mümkün
> değil mi?... Gugılladım. Bir sürü fikir verilmiş ama nedense win
> sistemlerde çalışmadı?! Chr(13)+ chr(10) ekleyecek bir yöntem yok mu
> hazırda...?
>
> --
> Kolay gelsin,
> Mucip:)
>
> _______________________________________________
> Linux-programlama mailing list
> [email protected]
> https://liste.linux.org.tr/mailman/listinfo/linux-programlama
> Liste kurallari: http://liste.linux.org.tr/kurallar.php
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap