Windows Python 2.4: Unbuffered flag causes SyntaxError oninteractive sessions?

Michael Hoffman cam.ac.uk at mh391.invalid
Wed Sep 14 14:49:52 EDT 2005


Lonnie Princehouse wrote:

> Evidently the unbuffered flag not only makes stdin unbuffered, but it
> also forces it into binary mode.  I didn't realize that when I posted
> earlier.
> 
> So the SyntaxErrors arise because the interpreter isn't converting \r\n
> into \n because stdin is binary.  Not a bug, although it would be nice
> to have an "unbuffered text mode" flag too...

so if you do this:

 >>> z = raw_input()
zzz

Does z contain 'zzz\r'?

For me, it just contains 'zzz'.
-- 
Michael Hoffman



More information about the Python-list mailing list