Friday, November 25, 2011

StringIO | Did you know that?

StringIO | Did you know that?: "StringIO
You can use it to redirect I/O.


 1
2
3
4
5
6
7
8
9
10









import sys, StringIO

a=StringIO.StringIO()
old_stdout = sys.stdout
sys.stdout = a
print "

'via Blog this'