dbm interoperability between Perl and Python?

Skip Montanaro skip at pobox.com
Tue Jan 29 11:30:16 EST 2002


    Roy> The problem is on Solaris.  On that platform, perl's dbmopen()
    Roy> produces .dir/.pag file pairs, which python doesn't seem to know
    Roy> how to read.

Sounds like good old fashioned dbm files.  On my linux system the dbm
library seems to create Berkeley DB 1.85 files (must be a linker issue).
Try this on your Solaris system:

    import dbm
    db = dbm.open("tmp/foo", "c")
    db['a'] = 'sdfsdfsdf'
    db.close()

and see what kind(s) of file(s) get created.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list