> > I would expect io.StringIO to be a match for the io.* stuff in Python > 3. So it should care whether it is a binary stream or a text stream. > Whereas StringIO.StringIO is your good old Python 2 StringIO, which expects > strs. > > On that basis, io.StringIO is a text stream, expecting Unicode > objects for transcription. 'str' is, in that context, probably > considered as 'bytes' in Python 3. >
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. Skip
-- http://mail.python.org/mailman/listinfo/python-list