importing csv file into sqlite
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Thu Dec 18 19:11:12 EST 2008
En Thu, 18 Dec 2008 04:17:47 -0200, James Mills
<prologic at shortcircuit.net.au> escribió:
> How big ? When size is important in data
> processing, you should _never_ try to
> load it all up at once. Use filters...
But your code does *exactly* that, it reads the whole file in memory:
> def mkBuffer(fd):
> buffer = StringIO()
> buffer.write(fd.read())
> ...
That mkBuffer function has no useful purpose IMHO, just remove it.
--
Gabriel Genellina
More information about the Python-list
mailing list