Re: enabling universal newline

2012-11-03 Thread Peter Kleiweg
Steven D'Aprano schreef op de 2e dag van de slachtmaand van het jaar 2012: > On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote: > > > In Python 3.1 and 3.2 > > > > At start-up, the value of sys.stdin.newlines is None, which means, > > universal newline should be enabled. But it isn't. > >

Re: enabling universal newline

2012-11-03 Thread Peter Otten
Steven D'Aprano wrote: > On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote: > >> In Python 3.1 and 3.2 >> >> At start-up, the value of sys.stdin.newlines is None, which means, >> universal newline should be enabled. But it isn't. > > What makes you think it is not enabled? $ python3 -c '

Re: enabling universal newline

2012-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2012 23:22:53 +0100, Peter Kleiweg wrote: > In Python 3.1 and 3.2 > > At start-up, the value of sys.stdin.newlines is None, which means, > universal newline should be enabled. But it isn't. What makes you think it is not enabled? sys.stdin.newlines shows you the newlines actually

enabling universal newline

2012-11-02 Thread Peter Kleiweg
In Python 3.1 and 3.2 At start-up, the value of sys.stdin.newlines is None, which means, universal newline should be enabled. But it isn't. So I do this: sys.stdin = io.TextIOWrapper(sys.stdin.detach(), newline=None) Now, sys.stdin.newlines is still None, but universal newline is enabled. W