[Metakit] problem getting dict into a view
Brian Kelley
fustigator at gmail.com
Sun Jul 3 12:57:01 CEST 2005
Metakit and dictionaries are pretty easy, but here are the rules
1) the dictionary key has to exist in the view already
2) each 'row' must have a different dictionary.
One nice feature is that dictionary keys that are not in the view are ignored.
example:
import metakit
st = metakit.storage()
vw = st.getas("test[a:I,b:S]")
data = {"a":1,'b':"hello"}
vw.append(data)
data = {"a":2,'b':"there"}
metatkit.dump(vw)
# ------ end example
output
a b
- -----
1 hello
2 there
- -----
Total: 2 rows
If you have any more questions, don't feel shy, I'll eventually respond :)
Brian
More information about the Metakit
mailing list