Module Text :: Class Text
[frames | no frames]

Class Text


The Text object

This object gives access to Texts in Blender.
Method Summary
list of strings asLines()
Retrieve the contents of this Text buffer as a list of strings.
  clear()
Clear this Text object: its buffer becomes empty.
string getFilename()
Get the filename of the file loaded into this Text object.
string getName()
Get the name of this Text object.
int getNLines()
Get the number of lines in this Text buffer.
  set(attribute, value)
Set this Text's attributes.
  setName(name)
Set the name of this Text object.
  write(data)
Append a string to this Text buffer.

Instance Variable Summary
  filename: The filename of the file loaded into this Text.
  mode: The follow_mode flag: if 1 it is 'on'; if 0, 'off'.
  name: The Text name.
  nlines: The number of lines in this Text.

Method Details

asLines()

Retrieve the contents of this Text buffer as a list of strings.
Returns:
A list of strings, one for each line in the buffer
           (type=list of strings)

clear()

Clear this Text object: its buffer becomes empty.

getFilename()

Get the filename of the file loaded into this Text object.
Returns:
string

getName()

Get the name of this Text object.
Returns:
string

getNLines()

Get the number of lines in this Text buffer.
Returns:
int

set(attribute, value)

Set this Text's attributes.
Parameters:
attribute - The attribute to change: currently, 'follow_cursor' is the only one available. It can be turned 'on' with value = 1 and 'off' with value = 0.
           (type=string)
value - The new attribute value.
           (type=int)

setName(name)

Set the name of this Text object.
Parameters:
name - The new name.
           (type=string)

write(data)

Append a string to this Text buffer.
Parameters:
data - The string to append to the text buffer.
           (type=string)

Instance Variable Details

filename

The filename of the file loaded into this Text.

mode

The follow_mode flag: if 1 it is 'on'; if 0, 'off'.

name

The Text name.

nlines

The number of lines in this Text.

Generated by Epydoc 2.1 on Thu Dec 22 22:38:14 2005 http://epydoc.sf.net