Welcome to mirror list, hosted at ThFree Co, Russian Federation.

testtext.py « doc « api2_2x « python « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e3fd1a5b019e95672cc4dfb7127d07255cab6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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