diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-09-14 19:21:54 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-14 19:23:00 +0200 |
commit | bdb8ed24488fd87cd30dd18744feeef0bd4b2c18 (patch) | |
tree | db6e7604f63c81f193d74d65e328d8b26640dd0d /source/lib/tdb/python/tdbdump.py | |
parent | 0143c320ccf21c00e1a09b8363cd42724b76faf9 (diff) | |
download | samba-v3-devel.tar.gz |
lib/tdb: sync build system changes and python code from samba4v3-devel
metze
Diffstat (limited to 'source/lib/tdb/python/tdbdump.py')
-rw-r--r-- | source/lib/tdb/python/tdbdump.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/lib/tdb/python/tdbdump.py b/source/lib/tdb/python/tdbdump.py new file mode 100644 index 00000000000..d759d771c87 --- /dev/null +++ b/source/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) |