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

noreply@sourceforge.net noreply@sourceforge.net
Mon, 17 Jun 2002 06:56:52 -0700


Bugs item #570044, was opened at 2002-06-17 15:56
You can respond by visiting: 
http://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: Nobody/Anonymous (nobody)
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.

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

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