getting the data from a large File object in a python script
Question see subject. The problem is that file.data is not a string if the file is large enough (it's a linked list), and fileobj.data.next is not callable through a python script, so my ideas have run out. I want to insert an uploaded csv file into a database and don't want to use an external method for that .... TIA, oliver
str(file.data) jens On Friday, May 9, 2003, at 07:51 US/Eastern, Oliver Bleutgen wrote:
Question see subject. The problem is that file.data is not a string if the file is large enough (it's a linked list), and fileobj.data.next is not callable through a python script, so my ideas have run out.
I want to insert an uploaded csv file into a database and don't want to use an external method for that ....
TIA, oliver
Jens Vagelpohl wrote:
str(file.data)
jens
Thanks, str(file) does it also (which doesn't surprise when looking at the source ;)). Sigh, I could swear I had at first used str(file.data), but it hadn't worked. Grrr. cheers, oliver
participants (2)
-
Jens Vagelpohl -
Oliver Bleutgen