[wellylug] converting dbm files to something else

jfouhy at paradise.net.nz jfouhy at paradise.net.nz
Thu Mar 10 15:14:44 NZDT 2005


Quoting Matthew Cruickshank <wellylug at holloway.co.nz>:

> Does anyone know how to convert dbm files to csv? (or something simple 
> that OpenOffice.org could open)

Python, maybe?

#!/usr/bin/env python

import anydbm

db = anydbm.open('myDatabase.dbm')

outfile = file('myDatabase.csv', 'w')

for key in db:
    outfile.write("%s,%s\n" % (key, db[key]))

outfile.close()

------------------------

I don't have any dbm files around to test this with,




More information about the wellylug mailing list