On Mon, May 13, 2013 at 10:45 AM, Fidel Pérez <[email protected]> wrote:

> Thank you both for the answers and clarifications (Terry). Everything was
> very useful.
>
> Edward: Yes, im trying the following code without success:
>
> thelist=p.subtree()
>> for p in thelist:
>>     g.es(p)
>> p.deletePositionsInList(thelist)
>> c.redraw()
>
>
This won't work.  At minimum, you would have to have:

    thelist = [z.copy() for z in p.subtree()]

This makes a copy of each position returned by the p.subtree iterator.
This ensures that the positions don't move as the iterator progresses.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to