title: oserror python 3.5.4 on win 10 1709 when using nosetest or print
body: <p>Since I upgraded my win 10 version 1703 to version 1709 (Fall Update), I have a persistent problem <strong>OSError</strong> when using <code>print</code> or <code>nose</code> command. My log with <code>nose</code>:</p>
  
  <pre><code>======================================================================
  ERROR: test_future_link_to_update_3
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 134, in run
      self.runTest(result)
    File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\case.py", line 152, in runTest
      test(result)
    File "c:\program files\python35\Lib\unittest\case.py", line 653, in __call__
      return self.run(*args, **kwds)
    File "c:\program files\python35\Lib\unittest\case.py", line 621, in run
      result.addSuccess(self)
    File "c:\users\sdn\work\git\pop-extrapole\env\lib\site-packages\nose\proxy.py", line 165, in addSuccess
      self.result.addSuccess(self.test)
    File "c:\program files\python35\Lib\unittest\runner.py", line 64, in addSuccess
      self.stream.flush()
  OSError: raw write() returned invalid length 2 (should have been between 0 and 1)
  </code></pre>
  
  <p>I can pass this problem by commenting <code>self.stream.flush()</code> but it's not a solution:</p>
  
  <pre><code>def addSuccess(self, test):
      super(TextTestResult, self).addSuccess(test)
      if self.showAll:
         self.stream.writeln("ok")
      elif self.dots:
         self.stream.write('.')
         # self.stream.flush()
  </code></pre>
  
  <p>Other log when using <code>print</code>:</p>
  
  <pre><code>Traceback (most recent call last):
    File "c:\program files\python35\Lib\multiprocessing\pool.py", line 119, in worker
      result = (True, func(*args, **kwds))
    File "c:\program files\python35\Lib\multiprocessing\pool.py", line 47, in starmapstar
      return list(itertools.starmap(args[0], args[1]))
    File "C:\Users\SDN\Work\git\pop-extrapole\extrapolation\extrapole.py", line 1463, in popcorn_process
      print(lk)
  OSError: raw write() returned invalid length 46 (should have been between 0 and 23)
  </code></pre>
  
  <p>Does anyone have an idea about that?</p>
  
  <p>Thanks,
  Uwevil</p>