def _makeStringIO(self, strval):
if PY2:<EOL><INDENT>return StringIO(strval)<EOL><DEDENT>return StringIO(strval.decode())<EOL>
Helper method to make sure the StringIO being returned will work.

Differences between Python 2.7/3.x mean we have a lot of cases to handle.