csv and iterator protocol

Kent Johnson kent37 at tds.net
Sun Jun 5 03:47:27 CEST 2005

Philippe C. Martin wrote:
> Can I initialize csv with input data stored in RAM (ex: a string) ? - so far
> I cannot get that to work. Or to rephrase the question, what Python "RAM"
> structure supports the "iterator protocol" ?

Many, including strings, lists and dicts. For your needs, a list of strings will work, or a cStringIO initialized from your data.


More information about the Python-list mailing list