Re: sqlite and TemporaryFile under Windows

2007-10-17 Thread Matthieu Brucher
> > Besides the fact that database management systems need lots of > random file accesses? That doesn't imply not supporting file-object. BTW, how is it possible to close the access to the database ? I deleted the object but Winows tells me that someone is still holding the file. Matthi

Re: sqlite and TemporaryFile under Windows

2007-10-16 Thread Matthieu Brucher
> > > 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 sourc

Re: sqlite and TemporaryFile under Windows

2007-10-16 Thread Paul McNett
Matthieu Brucher wrote: > > 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 fil

Re: sqlite and TemporaryFile under Windows

2007-10-15 Thread Matthieu Brucher
> > > 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 t

Re: sqlite and TemporaryFile under Windows

2007-10-15 Thread Paul McNett
Matthieu Brucher wrote: > Are you aware that you can do an in-memory database (IOW no file at > all)? > > cur = sqlite.connect (":memory:") > > > Yes, but in this case, how can I use the DB that I downloaded from the net ? Ah, sorry, I guess I missed that part. > If this is the way

Re: sqlite and TemporaryFile under Windows

2007-10-15 Thread Matthieu Brucher
> > Are you aware that you can do an in-memory database (IOW no file at all)? > > cur = sqlite.connect(":memory:") > Yes, but in this case, how can I use the DB that I downloaded from the net ? If this is the way of using sqlite, it is still cumbersome as a lot of other classes that work on files

Re: sqlite and TemporaryFile under Windows

2007-10-15 Thread Paul McNett
Matthieu Brucher wrote: > I want to create a temporary database that is downloaded for the net. So > I want to use a temporary file that will be deleted at the end of my > program. For this, I wanted to use tempfile.TemporaryFile. The problem > with Windows is that I can't give to sqlite3.connec

sqlite and TemporaryFile under Windows

2007-10-15 Thread Matthieu Brucher
Hi, I want to create a temporary database that is downloaded for the net. So I want to use a temporary file that will be deleted at the end of my program. For this, I wanted to use tempfile.TemporaryFile. The problem with Windows is that I can't give to sqlite3.connect() the file neither can I giv