diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-01-11 09:55:28 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-01-11 09:55:28 +1100 |
commit | 4f6177da78d0da64c1cda23bd7a176cfe2e6e140 (patch) | |
tree | 702f9b3f3821953c3a0d956db5ea2700be12943b /source4 | |
parent | 3688b7669a03ae9e5166f12ab9e1a82f066002c7 (diff) | |
parent | dc6058e9922b277c01b0569042a62509b7294dec (diff) | |
download | samba-4f6177da78d0da64c1cda23bd7a176cfe2e6e140.tar.gz samba-4f6177da78d0da64c1cda23bd7a176cfe2e6e140.tar.bz2 samba-4f6177da78d0da64c1cda23bd7a176cfe2e6e140.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit 588531bf211f5ede2731df56fd540934b673a2d7)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/tdb/python/tdbdump.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/tdb/python/tdbdump.py b/source4/lib/tdb/python/tdbdump.py new file mode 100644 index 0000000000..d759d771c8 --- /dev/null +++ b/source4/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 <tdb-file>" + 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) |