[ZODB-Dev] Problem with documentation and distribution files.

Michael Twomey michael.twomey@sun.com
Fri, 05 Apr 2002 14:48:57 +0100


Hi,

  The BTree module in ZODB seems to have been replaced with the BTrees 
module which contains different types of btrees (the two letters at the 
beginning show how the key -> data is mapped, e.g. OOBTree is Object -> 
Object whereas IOBTree is int -> object). To get that example working 
simply change the offending lines to:

  # Ensure that a 'userdb' key is present
  if not dbroot.has_key('userdb'):
      from BTrees.OOBTree import OOBTree
      dbroot['userdb'] = OOBTree()

The above should work (I haven't tested it but I use similar stuff).

mick

Estaban wrote:
> Hey, 
> 
> Can you help me?
> 
> The Zope standalone system seems to be working on my system now,
> but the only example file clearly uses BTree which is NOT part of the 
> standard python distribution OR the standalone ZODB distribution:
> 
> # Ensure that a 'userdb' key is present
> if not dbroot.has_key('userdb'):
>     import BTree
>     dbroot['userdb'] = BTree.BTree()
> 
> userdb = dbroot['userdb']
> 
> Can you help me out here? There are other BTREES in the standard python 
> distribution, but no BTree. with a BTree() thats for sure.
> 
> If you can help me, this would be a good thing to update in the docs.
> 
> Thanks!
> Estaban
> 
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
>