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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neville C. Dempsey

    #1

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

    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.bto pen("twiceopen. tbl",btflags=bt f)
    list1[key]="we have the technology"

    list2=bsddb.bto pen("twiceopen. tbl",btflags=bt f)
    #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

Working...