Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/taproject.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-23 15:11:29 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-23 15:11:29 (GMT)
commitc48caf275d45dd42d6de02db9dd1db499f681964 (patch)
tree518add3ba576c72813b8b7a72d6d92ab594dd3c8 /taproject.py
parent1d2ae134e6b30483b45d21a2452f9348861fd616 (diff)
moved connections to blk
Diffstat (limited to 'taproject.py')
-rw-r--r--taproject.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/taproject.py b/taproject.py
index 0bf21b3..ac8d165 100644
--- a/taproject.py
+++ b/taproject.py
@@ -89,7 +89,7 @@ def load_files(tw, ta_file, create_new_project=True):
else:
io = StringIO(text)
listdata = jload(io)
- print listdata
+ print "load files: %s" % (listdata)
# listdata = jdecode(text)
data = tuplify(listdata) # json converts tuples to lists
f.close()
@@ -240,7 +240,7 @@ def save_data(tw,fname):
io = StringIO()
jdump(data,io)
text = io.getvalue()
- print text
+ print "save data: %s" % (text)
# text = jencode(data)
f.write(text)
f.close()
@@ -356,12 +356,11 @@ def do_dialog(tw,dialog):
def blocks(tw): return [spr for spr in tw.sprite_list.list \
if spr.type == 'block']
-def findgroup(spr, block_list):
- group=[spr]
- blk = block_list.spr_to_block(spr)
+def findgroup(blk, block_list):
+ group=[blk.spr]
for spr2 in blk.connections[1:]:
if spr2 is not None:
- group.extend(findgroup(spr2, block_list))
+ group.extend(findgroup(block_list.spr_to_block(spr2), block_list))
return group
def find_top_block(blk, block_list):