GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Tuesday, March 22, 2011

Python - StringIO

StringIO is like a file. We treat a string like a file:
>>> import StringIO
>>> output = StringIO.StringIO()
>>> output.write('Hello World\n')
>>> content = output.getvalue()
>>> output.close();
Share/Bookmark

No comments:

Post a Comment