title: What's with binary files on Windows?
body: <p>I made a script to download a file, but it only works on Unix/Linux/OSX when I'm downloading binary executables, swf's, images, etc</p>
  
  <pre><code>\#Modfied section from PWB.py  
  import sys  
  if sys.version_info&lt;(2,8):  
      import urllib as request  
  else:  
      import urllib.request as request  
  x=request.urlopen("http://homestarrunner.com/intro.swf")  
  y=x.read()  
  x.close()  
  z=open("intro.swf","w")  
  z.write(y)  
  z.close() 
  </code></pre>
  
  <p>I will get the the file, and the usual unreadable garbage in the file, but it will be unreadable.</p>
  
  <p>It seems binary files always have these sorts of problem on Windows.
  Why is this?</p>
  
  <p>PS. How could I write my python code so that it will download?</p>