Added readline() and reset() for reading lines from a Blender Text Object and resetting the pointer to the beginning of the buffer. readline() will return the '\n' character and return '' when the end of the buffer is reached in accordance with other readline methods.

This commit is contained in:
2008-06-25 21:00:39 +00:00
parent e68834c75b
commit fc392040dd
4 changed files with 79 additions and 19 deletions

View File

@@ -100,6 +100,18 @@ class Text:
Clear this Text object: its buffer becomes empty.
"""
def reset():
"""
Reset the read IO pointer to the start of the buffer.
"""
def readline():
"""
Reads a line of text from the buffer from the current IO pointer
position to the end of the line.
@rtype: string
"""
def set(attribute, value):
"""
Set this Text's attributes.