<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would expect io.StringIO to be a match for the io.* stuff in Python<br>
3. So it should care whether it is a binary stream or a text stream.<br>
Whereas StringIO.StringIO is your good old Python 2 StringIO, which expects<br>
strs.<br>
<br>
On that basis, io.StringIO is a text stream, expecting Unicode<br>
objects for transcription. 'str' is, in that context, probably<br>
considered as 'bytes' in Python 3.<br></blockquote><div><br></div><div>Thanks.  This example was based on a function in Matplotlib. It appears the author switched from StringIO.StringIO to io.StringIO between 1.1 and 1.2.</div>
<div><br></div><div>Skip</div><div><br></div></div><br>