from panda3d.core import LineStream
- class LineStream
This is a special ostream that writes to a memory buffer, like ostrstream. However, its contents can be continuously extracted as a sequence of lines of text.
Unlike ostrstream, which can only be extracted from once (and then the buffer freezes and it can no longer be written to), the LineStream is not otherwise affected when a line of text is extracted. More text can still be written to it and continuously extracted.
- getLine() str
Extracts and returns the next line (or partial line) of text available in the
LineStreamobject. Once the line has been extracted, you may call
hasNewline()to determine whether or not there was an explicit newline character written following this line.
- hasNewline() bool