- print line + "%s" % r
-
-
-def findRoot(r, filter):
- root = None
- if type(r) == dict:
- if not r.has_key(filter):
- for k in r.keys():
- root = findRoot(r[k], filter)
- if root != None: return root
- else:
- return r[filter]
- elif type(r) in (tuple, list):
- for j in r:
- root = findRoot(j, filter)
- if root != None: return root
+ # print the wole thing
+ for (key, value) in record.dict["record"].iteritems():
+ if options.withkey:
+ line += "%s: " % key
+ line += "%s\n" % printVal(value)
+ print line
+
+# fix the iteratable values
+def printVal(value):
+ line = ""
+ if type(value) in (tuple, list):
+ for i in value:
+ line += "%s " % i