db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_THREAD|db.DB_INIT_CDB

N

Neville C. Dempsey

Why does this python program fail to read record "6000000"?

#!/usr/bin/env python
import bsddb # twiceopen.py

key="6000000"
btf=bsddb.db.DB_INIT_THREAD

list1=bsddb.btopen("twiceopen.tbl",btflags=btf)
list1[key]="we have the technology"

list2=bsddb.btopen("twiceopen.tbl",btflags=btf)
#print "key:",key,"val:",list2[key] # doesn't work...
print "first:",list2.first() # also fails first time...

list1.close()
list2.close()

Maybe the solution needs one of:
db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_THREAD|db.DB_INIT_CDB

N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,269
Messages
2,571,338
Members
48,025
Latest member
Rigor4

Latest Threads

Top