F
Fredrik
I know that I can redirect my standard output to a file like this:
STDOUT.reopen(File.open(filename,'w'))
But then, why can't I redirect it to a string like this? :
output = StringIpen('','w')
STDOUT.reopen(output)
Can somebody see what I am doing wrong?
Thanks a lot!
Fredrik
STDOUT.reopen(File.open(filename,'w'))
But then, why can't I redirect it to a string like this? :
output = StringIpen('','w')
STDOUT.reopen(output)
TypeError: can't convert StringIO into String
Can somebody see what I am doing wrong?
Thanks a lot!
Fredrik