Skip to navigation
Fastest way to create csv files or string collections in python
07.12.13
import StringIO output = StringIO.StringIO() output.write('First line.\n') print >>output, 'Second line.' # Retrieve file contents -- this will be # 'First line.\nSecond line.\n' contents = output.getvalue() # Close object and discard memory buffer -- # .getvalue() will now raise an exception. output.close() http://docs.python.org/library/stringio.html
Reply
Anonymous
Information Epoch 1732508769
Looking for the ninety percent solution.
Home
Notebook
Contact us