The problem you are facing is that not all of your child positions have 
'\n' at the end of the body. One solution would be to append 
child.b.strip() to the result in the loop and at the end to use 
'\n'.join(result).

Vitalije

On Sunday, April 19, 2020 at 4:27:53 AM UTC+2, lewis wrote:
>
> Using 
> p.b = '\n'.join(result)
>
> Here is the output result:
>
> "Model", "C1", "C2", "C3"
>
> "CSM1", 30, 40, 50
>
> "CSM2", 30, 45, 60
> "CSM3", 30, 55, 70
>
>
> Which as expected adds an extra leading newline between the text for each 
> node. Except in the case of the last node which I added manually, by 
> <Ctrl-i> insert-node command.
> Note that it is the *different behaviour of the manually added nodes* 
> which I can't explain.
>
> Regards
> Lewis
>
> On Saturday, April 18, 2020 at 11:10:04 PM UTC+10, Thomas Passin wrote:
>>
>>
>> You need to include the separators you want, in this case a newline:
>>
>> p.b = '\n'.join(result)
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7ed66144-5058-4a1b-b1c1-9620fced2701%40googlegroups.com.

Reply via email to