I\'m getting a
UnicodeEncodeError: \'ascii\' codec can\'t encode character u\'\\xa3\' in position 34: ordinal not in range(128)
on a strin
Python 2.6 introduced the io module and you should consider using io.StringIO(), "An in-memory stream for unicode text."
io
In older python versions this is not optimized (pure Python), in later versions this has been optimized to (fast) C code.