[Metakit] Mk4py

Brian Kelley fustigator at gmail.com
Tue Aug 2 10:08:07 CEST 2005


It seems to me that you are doing the right thing.  Here is a little
script that also does the same thing that you can play with:

import metakit
db = metakit.storage()
vw = db.getas('metakit[data:S,base:S]')
# add a row
vw.insert(0,{'data':'hi'})
metakit.dump(vw)
# data  base
# ----  ----
# hi       
# ----  ----
# Total: 1 rows

# find a row to update
rows = vw.select(data="hi")
if not rows:
    raise "Could not find a row to update"

print
print "altered row"
row = rows[0]

description = ['data','base']
dict = {'data':'foo'}
setattr(row, 'data', dict.get('data'))
metakit.dump(vw)
# data  base
# ----  ----
# foo       
# ----  ----
# Total: 1 rows


More information about the Metakit mailing list