Changeset 199 for test


Ignore:
Timestamp:
06/02/10 21:53:31 (14 years ago)
Author:
tim
Message:

reworked part of regfi C API to make python wrappers simpler
continued work on python wrappers
fixed some issues in pyregfi-smoketest. WIP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/pyregfi-smoketest.py

    r198 r199  
    1111    for value in iter.list_values():
    1212        i += 1
     13       
     14    return i
     15
    1316
    1417def 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
    2128        total_values += num_values
    22 
    23         num_values += iter_values(iter)
     29        iter.up()
    2430
    2531    return (total_keys, total_values)
     
    3036    iter = rf.get_key()
    3137    print walk_tree(iter)
    32    
Note: See TracChangeset for help on using the changeset viewer.