On Tue, Aug 30, 2016 at 5:40 AM, Israel Hands <[email protected]> wrote:

it seems to be easier to read the file line by line than it is to read the
> body text of a node line by line
>

​lines = g.splitLines(p.b)

will split​
 ​the body text into lines, preserving trailing newlines.​

and similarly it seems easier to write to a file line by line than it is to
> write to the body text of a node line by line.
>

​p.b = ''.join(lines)

will write the lines given above back to the body text.​

​Note that '' is two single quotes.​


​Because g.splitLines preserves newlines, p.b will remain unchanged unless
you change one of the lines in the meantime.​

HTH.

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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to