Learn To Program
Increase Your Knowlegde and Build Your Skill!
Pages
(Move to ...)
Home
Me
▼
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();
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment