append Method (Python)
.append(line,skip). Appends lines to an existing text block. The argument line is a string
that specifies the text. The string may include the escape sequence \n
to specify line breaks, but must otherwise
be specified as plain text (HTML and rich text formatting are not
supported). The optional argument skip specifies the number of new lines to create when appending the specified
line. The default is 1 and results in appending the single specified
line. Integers greater than 1 will result in blank lines preceding
the appended line. For example, specifying skip=3
will result in two blank lines before the appended
line.
Example
import spss
spss.StartProcedure("mycompany.com.demo")
textBlock = spss.TextBlock("Text block name",
"A single line of text.")
textBlock.append("A second line of text.")
textBlock.append("A third line of text preceded by a blank line.",skip=2)
spss.EndProcedure()