title: Python: How to get StringIO.writelines to accept unicode string?
body: <p>I'm getting a </p>
  
  <pre><code>UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 34: ordinal not in range(128)
  </code></pre>
  
  <p>on a string stored in 'a.desc' below as it contains the '£' character.  It's stored in the underlying Google App Engine datastore as a unicode string so that's fine.  The cStringIO.StringIO.writelines function is trying seemingly trying to encode it in ascii format:</p>
  
  <pre><code>result.writelines(['blahblah',a.desc,'blahblahblah'])
  </code></pre>
  
  <p>How do I instruct it to treat the encoding as unicode if that's the correct phrasing?</p>
  
  <p>app engine runs on python 2.5</p>