Python, lire CRLF fichier texte comme il est, avec CRLF

with open(fn, 'rt') as f:
    lines = f.readlines()

Ce lit CR LF fichier texte (WinXP, Py 2.6) avec LF ligne se termine. Donc lines contiennent des '\n' se termine. Comment obtenir des lignes comme:

  • pour CRLF fichier obtenir des lignes avec '\n\r " se termine
  • pour LF fichier obtenir des lignes avec des '\n' se termine
InformationsquelleAutor Prog1020 | 2013-12-03