- Timestamp:
- 06/02/10 21:53:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/pyregfi-smoketest.py
r198 r199 11 11 for value in iter.list_values(): 12 12 i += 1 13 14 return i 15 13 16 14 17 def walk_tree(iter): 15 total_keys = 0 16 total_values = 0 17 18 for sub_key in iter: 19 num_keys,num_values = walk_tree(sub_key) 20 total_keys += num_keys + 1 18 total_keys = 1 19 total_values = iter_values(iter) 20 print "total_values:", total_values 21 22 for sub_key in iter: 23 print sub_key.keyname 24 25 print iter.down() 26 num_keys,num_values = walk_tree(iter) 27 total_keys += num_keys 21 28 total_values += num_values 22 23 num_values += iter_values(iter) 29 iter.up() 24 30 25 31 return (total_keys, total_values) … … 30 36 iter = rf.get_key() 31 37 print walk_tree(iter) 32
Note: See TracChangeset
for help on using the changeset viewer.