source: vendor/3.5.0/lib/tdb/python/tdbdump.py

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 291 bytes
Line 
1#!/usr/bin/python
2# Trivial reimplementation of tdbdump in Python
3
4import tdb, sys
5
6if len(sys.argv) < 2:
7 print "Usage: tdbdump.py <tdb-file>"
8 sys.exit(1)
9
10db = tdb.Tdb(sys.argv[1])
11for (k, v) in db.iteritems():
12 print "{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v)
Note: See TracBrowser for help on using the repository browser.