title: TypeError: 'str' does not support the buffer interface
body: <pre class="lang-python prettyprint-override"><code>plaintext = input("Please enter the text you want to compress")
  filename = input("Please enter the desired filename")
  with gzip.open(filename + ".gz", "wb") as outfile:
      outfile.write(plaintext) 
  </code></pre>
  
  <p>The above python code is giving me following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 33, in &lt;module&gt;
      compress_string()
    File "C:/Users/Ankur Gupta/Desktop/Python_works/gzip_work1.py", line 15, in compress_string
      outfile.write(plaintext)
    File "C:\Python32\lib\gzip.py", line 312, in write
      self.crc = zlib.crc32(data, self.crc) &amp; 0xffffffff
  TypeError: 'str' does not support the buffer interface
  </code></pre>