[Python-bugs-list] [ python-Bugs-570044 ] "python -u" not binary on cygwin

noreply@sourceforge.net noreply@sourceforge.net
Fri, 09 Aug 2002 01:26:08 -0700


Bugs item #570044, was opened at 2002-06-17 15:56
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=570044&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sjoerd Mullender (sjoerd)
>Assigned to: Jason Tishler (jlt63)
>Summary: "python -u" not binary on cygwin

Initial Comment:
python -u is supposed to put sys.stdin and sys.stdout
in binary mode on systems where such things matter.
This does not happen on Window under Cygwin.

Try
python -u -c 'import sys;
open("x","wb").write(sys.stdin.read())' < some-text-file

and notice that the newly created file "x" has just \n
line endings instead of \r\n.

A patch is included.

----------------------------------------------------------------------

>Comment By: Sjoerd Mullender (sjoerd)
Date: 2002-08-09 10:26

Message:
Logged In: YES 
user_id=43607

Assigned to Jason, since he seems to be the Cygwin expert. :-)
Does the patch make sense on other Cygwin installations than
my own?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=570044&group_id=5470