Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
 summaryrefslogtreecommitdiffstats log msg author committer range
diff options
 context: 12345678910152025303540 space: includeignore mode: unifiedssdiff
author committer Walter Bender 2010-11-16 14:46:11 (GMT) Walter Bender 2010-11-16 14:46:11 (GMT) 3c36b15735c3313a76e08f1f162b278adfa8ba42 (patch) 576700d8536c75c66529681c86bffa393eef1763 7ebe6872eba46296baa4d2a04b263f915d2aa2af (diff)
cleaned up encapsulation problem
-rw-r--r--TurtleArt/taexportlogo.py15
-rw-r--r--TurtleArt/tautils.py10
2 files changed, 13 insertions, 12 deletions
 diff --git a/TurtleArt/taexportlogo.py b/TurtleArt/taexportlogo.pyindex 3f4e625..bfa7ca8 100644--- a/TurtleArt/taexportlogo.py+++ b/TurtleArt/taexportlogo.py@@ -22,7 +22,6 @@ IGNORE = ["hideblocks", "showblocks", "fullscreen", "polar", "cartesian", "sandwichbottom", "id"] import math-from tautils import walk_stack try: from sugar.datastore import datastore except:@@ -127,7 +126,7 @@ tasetshade :shade \r" """ for b in bs: this_stack = ""- data = walk_stack(tw, b)+ data = walk_stack(tw.lc, b, tw.block_list.list) # We need to catch several special cases: stacks, random, etc. stack = False namedstack = False@@ -356,3 +355,15 @@ tasetshade :shade \r" "make \"taheap []\r" + code code = "window\r" + code return code+++def walk_stack(lc, blk, list):+ """ Convert blocks to logo psuedocode. """+ from tautils import find_top_block++ top = find_top_block(blk)+ if blk == top:+ code = lc.run_blocks(top, list, False)+ return code+ else:+ return []diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.pyindex 3445b3e..7139f3b 100644--- a/TurtleArt/tautils.py+++ b/TurtleArt/tautils.py@@ -809,13 +809,3 @@ def get_hardware(): return XO1 else: return UNKNOWN---def walk_stack(tw, blk):- """ Convert blocks to logo psuedocode. """- top = find_top_block(blk)- if blk == top:- code = tw.lc.run_blocks(top, tw.block_list.list, False)- return code- else:- return []