Some code:
import cStringIO def f(): buffer = cStringIO.StringIO() buffer.write(\'something\') return buffer.getvalue()
The docume
I wound up using a try block to handle it.
try
import cStringIO def f(): buffer = cStringIO.StringIO() try: buffer.write('something') return buffer.getvalue() finally: buffer.close()