There's something weird with GetLine. Here's a short demonstration:
import pn, scintilla
from pypn.decorators import script
@script("test")
def f():
sci = scintilla.Scintilla(pn.CurrentDoc())
s = ''
ln = sci.GetLine(0, s)
pn.AddOutput(s)
pn.AddOutput(str(len(s)))
Executing the script on itself first prints the import line and its EOL characters but len(s) is zero. It's like s is still an empty string except when I print it. Is that even the correct way to use GetLine or have I misunderstood the second parameter?