Hello.
I am have trouble accessing an OOBTree.
I have found several clues that indicate several different syntaxes,
none of which work.
Here are some of the things I've tried:
===============================================================
from BTrees.OOBTree import OOBTree
tree = OOBTree()
tree['a'] = 'AAA'
Gets:
Error Type: TypeError
Error Value: object does not support item or slice assignment
===============================================================
from BTrees.OOBTree import OOBTree
tree = OOBTree()
tree.insert['a'] = 'AAA'
Gets:
Error Type: Unauthorized
Error Value: You are not allowed to access insert in this context
===============================================================
from BTrees.OOBTree import OOBTree
tree = OOBTree()
insert(tree, 'a', 'AAA')
Gets:
Error Type: NameError
Error Value: global name 'insert' is not defined
===============================================================
from BTrees.OOBTree import OOBTree
tree = OOBTree()
OOBTree.insert(tree, 'a', 'AAA')
Gets:
Error Type: Unauthorized
Error Value: You are not allowed to access insert in this context
===============================================================
Also, I need to be able to access elements of the tree.
Do I use has_key to check for existence of an element?
I haven't been able to get it working either.
Do I use
Val = tree['a']
to retrieve the value?
Third, how do I make my object persistent?
I know that there is a Persistent package, but I don't know how to
make my tree persistent.
Thank you very much,
Glen