[pygtk] "Rolling Up" Calculations
Andrew Rowland
weibullguy at gmail.com
Tue Nov 15 19:03:43 WST 2011
> I'd proceed recursively (untested/pseudo code):
>
> def value (iter):
> if tree.iter_has_child():
> val = 0
> for index in range( tree.iter_n_children( iter ) ):
> val += value( tree.iter_nth_child( iter, i ) )
> return val
> else:
> return tree.get( iter, 3 )
>
Yes, this was what was needed to get my brain in gear. Thanks for the help.
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20111115/91973d63/attachment.html>
More information about the pygtk
mailing list