StringIO.readlines() works on py2 as well