Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/talogo.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-26 04:41:46 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-26 04:41:46 (GMT)
commit18a50f72447c28c82c6283d51ab52e9b153836bc (patch)
tree03619071243f6acb5d83dfb1e4ddfbffffe64034 /talogo.py
parentd55ff0e2c64ea5c90a8573ca97b969e09a143d2b (diff)
fixed most of the project-loading problems
Diffstat (limited to 'talogo.py')
-rw-r--r--talogo.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/talogo.py b/talogo.py
index 68f7f38..ed2b194 100644
--- a/talogo.py
+++ b/talogo.py
@@ -63,21 +63,27 @@ class logoerror(Exception):
return repr(self.value)
def run_blocks(lc, blk, blocks, run_flag):
+ print "run blocks: %s" % (blk.name)
+ for b in blocks:
+ if b is None:
+ print " None"
+ else:
+ print " %s" % b.name
# user-defined stacks
for x in lc.stacks.keys():
- lc.stacks[x]= None
+ lc.stacks[x] = None
# two built-in stacks
lc.stacks['stack1'] = None
lc.stacks['stack2'] = None
for b in blocks:
- if b.name=='def action 1':
- lc.stacks['stack1']= readline(lc,blocks_to_code(lc, b))
+ if b.name == 'def action 1':
+ lc.stacks['stack1'] = readline(lc,blocks_to_code(lc, b))
if b.name=='def action 2':
- lc.stacks['stack2']= readline(lc,blocks_to_code(lc, b))
- if b.name=='def action':
+ lc.stacks['stack2'] = readline(lc,blocks_to_code(lc, b))
+ if b.name == 'def action':
if (b.connections[1] is not None):
- text=b.connections[1].spr.labels[0]
- lc.stacks['stack3'+text]= readline(lc,blocks_to_code(lc, b))
+ text = b.connections[1].spr.labels[0]
+ lc.stacks['stack3'+text] = readline(lc,blocks_to_code(lc, b))
code = blocks_to_code(lc, blk)
if run_flag is True:
print "code: %s" % (code)