- Timestamp:
- 06/03/10 01:08:20 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/pyregfi-smoketest.py
r199 r200 15 15 16 16 17 def walk_tree(iter):18 total_keys = 119 total_values = iter_values(iter)20 print "total_values:", total_values21 22 for sub_key in iter:23 print sub_key.keyname24 25 print iter.down()26 num_keys,num_values = walk_tree(iter)27 total_keys += num_keys28 total_values += num_values29 iter.up()30 31 return (total_keys, total_values)32 33 34 17 for f in files: 35 18 rf = pyregfi.RegistryFile(f) 36 19 iter = rf.get_key() 37 print walk_tree(iter) 20 21 num_keys = 0 22 num_values = 0 23 # The iterator now walks the entire registry hive, depth-first 24 for key in iter: 25 #print key.keyname 26 num_keys +=1 27 num_values += iter_values(iter) 28 29 print "keys: %d" % num_keys 30 print "values: %d" % num_values
Note: See TracChangeset
for help on using the changeset viewer.