From 4f2b99646bb88bbae2fb84b7199cab607577b3db Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 14 Sep 2008 19:21:54 +0200 Subject: lib/tdb: sync build system changes and python code from samba4 metze (This used to be commit bdb8ed24488fd87cd30dd18744feeef0bd4b2c18) --- source3/lib/tdb/python/tdbdump.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 source3/lib/tdb/python/tdbdump.py (limited to 'source3/lib/tdb/python/tdbdump.py') diff --git a/source3/lib/tdb/python/tdbdump.py b/source3/lib/tdb/python/tdbdump.py new file mode 100644 index 0000000000..d759d771c8 --- /dev/null +++ b/source3/lib/tdb/python/tdbdump.py @@ -0,0 +1,12 @@ +#!/usr/bin/python +# Trivial reimplementation of tdbdump in Python + +import tdb, sys + +if len(sys.argv) < 2: + print "Usage: tdbdump.py " + sys.exit(1) + +db = tdb.Tdb(sys.argv[1]) +for (k, v) in db.iteritems(): + print "{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v) -- cgit