mx.BeeBase.BeeDict

M.-A. Lemburg mal at lemburg.com
Fri Apr 26 13:55:42 EDT 2002


Magnus Heino wrote:
> 
> Could anyone please show me an example usage of mx.BeeBase?
>
> Thanks!
> 
> [magnus at daysleeper magnus]$ python2.2
> Python 2.2.1 (#2, Apr 13 2002, 14:35:50)
> [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from mx.BeeBase.BeeDict import BeeStringDict
> >>> s=BeeStringDict('foo')
> >>> s['foo']='bar'
> >>> s['foo']
> 'bar'
> >>> s.commit()
> 2000 2002-04-26 13:33:54.74 [p4474] Committing all changes for "foo"...
> 2000 2002-04-26 13:33:54.74 [p4474]  writing key "foo":
> -------------------------------------------------------------------------------
> 'bar'
> -------------------------------------------------------------------------------
> not found; cc=-1
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/opt/lib/python2.2/site-packages/mx/BeeBase/BeeDict.py", line 1067,
> in commit
>     index[key] = address
> TypeError: record address must be an integer
> >>>

Please upgrade to the lastest egenix-mx-base beta which I've
announced on the egenix-users mailing list. What you are
seeing is the result of the file object methods returning
longs instead of integers and mxBeeBase in the GA vesion
of egenix-mx-base is currently not capable of handling these.

The beta is, though.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/





More information about the Python-list mailing list