A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-September/074796.html below:

New lines, carriage returns, and Windows

[Python-Dev] [python] Re: New lines, carriage returns, and WindowsSteven Bethard steven.bethard at gmail.com
Sat Sep 29 20:42:38 CEST 2007
On 9/29/07, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> Terry Reedy wrote:
> > There are two normal ways for internal Python text to have \r\n:
> > 1. Read from a file with \r\r\n.  Then \r\r\n is correct output (on the
> > same platform).
> > 2. Intentially put there by a programmer.  If s/he also chooses default \n
> > translation on output, \r<translation of \n> is correct.
> >
> Actually, I usually get these strings from Windows UI components. A file
> containing '\r\n' is read in with '\r\n' being translated to '\n'. New
> user input is added containing '\r\n' line endings. The file is written
> out and now contains a mix of '\r\n' and '\r\r\n'.

Out of curiosity, why don't the Python wrappers for your Windows UI
components do the appropriate '\r\n' -> '\n' conversions?

STeVe
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4