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()


Also tried several variations but cant get it to work (the list on the log 
will be correct and be the list in the nodes, but the command 
deletepositionsinlist just wont do anything). My only guess is that it 
needs just the position not the full node description, so I am reading on 
which command isolates that.
Any further suggestions from there?
Thanks.

On Monday, May 13, 2013 3:48:04 PM UTC+2, Terry wrote:
>
> On Sun, 12 May 2013 23:52:20 -0700 (PDT) 
> Fidel Pérez <fidel...@gmail.com <javascript:>> wrote: 
>
> > I already tried (in several ways) to go to the "childest" child and 
> delete 
> > it, then go up, delete, etc, but after the first "childest child" 
> deletion, 
> > when trying to delete its brothers with the iteration, Leo wont work as 
> I 
> > would expect. (We can discard the problem you suggested) 
>
> It's worth understanding that problem though.  So if A has three 
> children 
>
> A 
>   B1 
>   B2 
>   B3 
>
> Then the position class has an address for each node, B1 is the first 
> child of A, B2 the second, etc.  So even though B1 is a "childest" 
> node (aka leaf node :-) deleting it still interferes with the position 
> class's address for B2, B2 becomes the first rather than the second. 
> So you'd need to delete the leaf nodes from last to first, something 
> you see quite often in list deletion in Python. 
>
> I can't remember how I imported FreeMind way back when... hah, just 
> found it, I used XSLT, the XML to XML translator. 
>
> If I was doing it today, I'd use the Python lxml XML parsing library to 
> iterate over the FreeMind XML file, and build the Leo tree from that 
> iteration. 
>
> It sounds like you've exported from FreeMind to HTML then imported the 
> HTML into Leo and are then working on tidying up the result.  That is a 
> reasonable approach, but you might find parsing the FreeMind XML 
> directly was cleaner and gave more of the original data.  If you think 
> you'll ever want to deal with XML in Python the lxml library is worth 
> knowing. 
>
> Cheers -Terry 
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
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