Poking at dbsqlite.py

5 views
Skip to first unread message

Diane Trout

unread,
Aug 11, 2011, 3:11:39 AM8/11/11
to pygr...@googlegroups.com
Hello,

I was trying to build an annotation file on an ubuntu 11.04 system and was getting unicode type errors from bsddb. (My sqlite column names are getting converted to unicode, and when AnnotationDB tried to create a shelf it choked.)

Looking through the archives there was some discussion about using dbsqlite.py from some of Titus' projects instead of bsddb, So I thought I'd see what might happen if I swapped it in.

The most interesting issue I found is that shelve supports serializing dictionaries and other complex types and raw sqlite doesn't.

e.g.

d['d'] = {}

doesn't work.

The most obvious solution was to wrap sending the value to and from sqlite with cPickle.dumps, loads.

Another question... would you have any guesses why nosetests --pdb wouldn't work when being run in a checkout of pygr? For some reason its the debug plugin is getting disabled. (Which is making debugging some of the unittests harder).

Diane

signature.asc
Reply all
Reply to author
Forward
0 new messages