This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/python/api2_2x/doc/testtext.py

30 lines
433 B
Python
Raw Normal View History

# Test Blender.Text
import Blender
from Blender import Text
txt = Text.New("MyText")
all_texts = Text.Get()
for i in [1,4,7]:
txt.write("%d\n%d\n%d little indians\n" % (i, i+1, i+2))
x = txt.getNLines()
txt.write("%d little indian boys!" % x)
lines = txt.asLines()
txt.clear()
txt.write("... Yo-ho-ho! And a bottle of rum!")
for s in lines:
print s
print all_texts
print txt.asLines()
Text.unlink(txt)
print all_texts