title: base64 decode and write image / python3 / must be str, not bytes
body: <p>I've looked through about 10 different methods to do this, but no matter what I've tried the result seems to be the same.  I have a simple mdb that that I'm pulling a key/value pair where the value is b64 encoded images:  </p>
  
  <pre><code>for key, value in db_cursor:
          with open(output_path, 'w') as of:
          of.write(base64.decodestring(value))
  #       of.write(value.decode('base64'))
      break
  </code></pre>
  
  <p>Both methods result in:</p>
  
  <pre><code>write() argument must be str, not bytes
  </code></pre>
  
  <p>What am I doing wrong?</p>