title: gzip string, then base64 value of gzip
body: <p>I want implement this line of <code>bash</code> in <code>python 2.6</code>.</p>
  
  <p><code>echo 'some string' | gzip | base64</code></p>
  
  <p>Right now I have this:</p>
  
  <pre><code>import io
  import gzip
  import base64
  
  st = 'some string'
  in = io.BytesIO(st)
  gzz = gzip.GzipFile(fileobj=in)
  </code></pre>
  
  <p>I'm not sure what to do next because I've been playing around with different methods and I keep getting errors for all the different methods I try. I'm not sure if I am headed in the right direction</p>