sqlite and TemporaryFile under Windows

Matthieu Brucher matthieu.brucher at gmail.com
Tue Oct 16 01:35:20 EDT 2007


>
> > If this is the way of using sqlite, it is still cumbersome as a lot of
> > other classes that work on files can work on file-like (and isn't it the
> > whole point of Python ;) ?
>
> I don't think that sqlite can work on streams, or on file-like objects.



Obviously it cannot, but what are the reason it can't ?


You could just save it as tempfile.mktemp(). I think the utility of this
> function in this case outweighs the possibility that your routine will
> coincidentally overwrite another file of the same name within the same
> fraction of a second. The warning is dire, but when you think about it
> in context it doesn't seem that bloody likely that there will be a
> problem. ;)


Well, I could, but in this case I have to delete the file myself, which the
whole point of the use of TemporaryFile.

Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071016/71b4f40b/attachment.html>


More information about the Python-list mailing list