Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2012 14:35
What would you like to do?
Analyze Sparrow's Tokyo Cabinet
import tc
import os.path
import pprint
db = tc.HDB()
'Application Support/Sparrow/'+
'data.db/data.tch'), tc.HDBOREADER )
tmp = {}
for x in db:
if x.split('.')[0] not in tmp:
tmp[x.split('.')[0]] = [0,0]
tmp[x.split('.')[0]][0] += 1
tmp[x.split('.')[0]][1] += len(db[x])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment