'Print the database to stdout for debugging'

def _db_print(self):

    print '********    Printing    raw    database    for    debugging    ********'
    cur = self.db.cursor()
    try:
        (key, data) = cur.first()
        while 1:
            print repr({key: data})
            next = cur.next()
            if next:
                (key, data) = next
            else:
                cur.close()
                return
    except db.DBNotFoundError:
        cur.close()
