Commit 48892c8b by Steven Bird

put demo code into demo function

svn/trunk@3667
parent 1a03a3fc
...@@ -876,8 +876,8 @@ def draw_trees(*trees): ...@@ -876,8 +876,8 @@ def draw_trees(*trees):
## Demo Code ## Demo Code
##////////////////////////////////////////////////////// ##//////////////////////////////////////////////////////
import random def demo():
if __name__ == '__main__': import random
def fill(cw): def fill(cw):
cw['fill'] = '#%06d' % random.randint(0,999999) cw['fill'] = '#%06d' % random.randint(0,999999)
...@@ -967,3 +967,6 @@ built from tree_to_treesegment.""" ...@@ -967,3 +967,6 @@ built from tree_to_treesegment."""
# Run mainloop # Run mainloop
cf.mainloop() cf.mainloop()
if __name__ == '__main__':
demo()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment