Hmm :)
I am looking for the same thing, I used to do it with sql, but I hoped
to make it more orm
Here is how i do it for sqlite
def duplicateToDisk(self, file):
'''Tohle ulozi databazi, ktera byla pouze v pameti, na disk'''
cur = self.connection()
import os
if os.path.exists(file):
os.remove(file)
cur.execute("attach %s as extern" % file)
self.checkTable('extern.dictionary')
cur.execute("insert into extern.dictionary select * from
dictionary")
cur.execute("detach extern")
self.commit()
On Sep 17, 8:51 pm, "Doug Farrell" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm using SqlAlchemy with Sqlite to maintain a dynamic state table for a
> constantly running process. The table for this is kept in memory using
> the create_engine('sqlite:///:memory:') function call. My process is an
> endlessly running loop (with a sleep state), and I'd like to read the
> databse in from a disk file into the memory structure, process through
> my loop, and then write the state back out to the disk file, completely
> replacing the contents of the disk copy. Can anyone tell me, help me,
> advise me how I might go about doing this? I'm new to SqlAlchemy (noob),
> so forgive me if this is an dopey question.
>
> Thanks in advance,
> Doug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---