27 May
2003
27 May
'03
3:52 p.m.
THerp@apriori.de wrote:
Hi, everyone,
I'd like to read lines from a File object to do a database import.
After a lot of struggling (trying index_html and document_src and...) and finally posting the question I managed myself meanwhile: The data attribute of the file object gives me its content.
You may run into trouble if your file is too big, because then data is not what you expect it to be (it may be practically a linked list of data chunks, for performance reasons). Use str(file.data) or str(file) to be on the save side. cheers, oliver