progressbar.six module

Library to make differences between Python 2 and 3 transparent

progressbar.six.StringIO()

StringIO([s]) – Return a StringIO-like stream for reading or writing