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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-06-26 06:03:51 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-06-26 06:03:51 +0400
commit72f0cdace4cd4e83b8175f255a0d7733bfa2f0d1 (patch)
treef9d8f3d9d36933bc50785bdc773baf7f1ac5ddc9 /source/blender/python/api2_2x/doc/testtext.py
parentdd8f2166916844eb8b8013fa78931b3f671fe9f5 (diff)
* Added function Blender.Draw.GetStringWidth().
* Added doc and small test for Blender.Test * trying changes to make Blender.Test.unlink() safer.
Diffstat (limited to 'source/blender/python/api2_2x/doc/testtext.py')
-rw-r--r--source/blender/python/api2_2x/doc/testtext.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/testtext.py b/source/blender/python/api2_2x/doc/testtext.py
new file mode 100644
index 00000000000..3e3fd1a5b01
--- /dev/null
+++ b/source/blender/python/api2_2x/doc/testtext.py
@@ -0,0 +1,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