sqlite and TemporaryFile under Windows

Matthieu Brucher matthieu.brucher at gmail.com
Tue Oct 16 18:47:05 CEST 2007


>
> > Obviously it cannot, but what are the reason it can't ?
>
> I have no idea.
>
> > Well, I could, but in this case I have to delete the file myself, which
> > the whole point of the use of TemporaryFile.
>
> Go with the flow dude! Unless you want to solve the issue by delving in
> to the source for pysqlite yourself so that it can work on file-like
> object, the extra os.unlink call doesn't seem to be a big deal.



Well, that's what I'm doing now :) (Perhaps the fact that the sqlite module
is in C explains the matter)


Also, you are downloading the file off the Internet somewhere anyway.
> Either you work with that stream without creating a file (which we've
> already discovered isn't possible) or you save it to a file. Sure, it
> would be nice to use TemporaryFile(), but it shouldn't be a showstopper
> to use mktemp() an unlink() instead.


Yes, I suppose...

Thank you for your time

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


More information about the Python-list mailing list