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
Willian Padovani Germano 72f0cdace4 * Added function Blender.Draw.GetStringWidth().
* Added doc and small test for Blender.Test
* trying changes to make Blender.Test.unlink() safer.
2003-06-26 02:03:51 +00:00

30 lines
433 B
Python

# 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