SVN: r24850 - trunk/quixote

Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Mon, 2 Aug 2004 10:16:45 -0400
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: nascheme
Date: 2004-08-02 10:16:24 -0400 (Mon, 02 Aug 2004)
New Revision: 24850

Modified:
   trunk/quixote/ACKS
   trunk/quixote/publish.py
Log:
On Windows, put both stdin and stdout in binary mode.


Modified: trunk/quixote/ACKS
===================================================================
--- trunk/quixote/ACKS	2004-08-02 14:10:34 UTC (rev 24849)
+++ trunk/quixote/ACKS	2004-08-02 14:16:24 UTC (rev 24850)
@@ -31,6 +31,7 @@
 Nicola Larosa
 Hamish Lawson
 Patrick K. O'Brien
+Brendan T O'Connor
 Ed Overly
 Paul Richardson
 Jeff Rush

Modified: trunk/quixote/publish.py
===================================================================
--- trunk/quixote/publish.py	2004-08-02 14:10:34 UTC (rev 24849)
+++ trunk/quixote/publish.py	2004-08-02 14:16:24 UTC (rev 24850)
@@ -557,8 +557,9 @@
         once and return.
         """
         if sys.platform == "win32":
-            # On Windows sys.stdout is opened in text mode by default
+            # on Windows, stdin and stdout are in text mode by default
             import msvcrt
+            msvcrt.setmode(sys.__stdin__.fileno(), os.O_BINARY)
             msvcrt.setmode(sys.__stdout__.fileno(), os.O_BINARY)
         self.publish(sys.__stdin__, sys.__stdout__, sys.__stderr__, os.environ)