urllib2.StringIO()

urllib2.StringIO()

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