From 231b2dd249e35f83cd281b92e045860947a33169 Mon Sep 17 00:00:00 2001 From: Pootle daemon Date: Fri, 15 Feb 2013 05:31:35 +0000 Subject: Merge branch 'master' of git.sugarlabs.org:turtleart/mainline --- diff --git a/NEWS b/NEWS index dc8022b..9a1c358 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +172 + +ENHANCEMENTS: +* Prevent rearrangement of blocks while program is running +* New translations + 171 ENHANCEMENTS: diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index 2ef21c2..ffa07a2 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -64,10 +64,10 @@ from random import uniform from gettext import gettext as _ -from tapalette import make_palette, define_logo_function -from talogo import primitive_dictionary, logoerror -from tautils import convert, chr_to_ord, round_int, strtype -from taconstants import COLORDICT, CONSTANTS, XO30 +from tapalette import (make_palette, define_logo_function) +from talogo import (primitive_dictionary, logoerror) +from tautils import (convert, chr_to_ord, round_int, strtype) +from taconstants import (COLORDICT, CONSTANTS) def _color_to_num(c): @@ -436,14 +436,9 @@ pensize\rend\r') def _color_palette(self): """ The basic Turtle Art color palette """ - if self.tw.hw == XO30: - palette = make_palette('pen', - colors=["#00FFFF", "#00A0A0"], - help_string=_('Palette of pen colors')) - else: - palette = make_palette('colors', - colors=["#00FFFF", "#00A0A0"], - help_string=_('Palette of pen colors')) + palette = make_palette('colors', + colors=["#00FFFF", "#00A0A0"], + help_string=_('Palette of pen colors')) self._make_constant(palette, 'red', _('red'), CONSTANTS['red']) self._make_constant(palette, 'orange', _('orange'), diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py index f42a9b9..3f64066 100644 --- a/TurtleArt/tablock.py +++ b/TurtleArt/tablock.py @@ -22,16 +22,16 @@ import gtk import cairo -from taconstants import EXPANDABLE, EXPANDABLE_ARGS, OLD_NAMES, CONSTANTS, \ - STANDARD_STROKE_WIDTH, BLOCK_SCALE, BOX_COLORS, GRADIENT_COLOR, \ - EXPANDABLE_FLOW, COLORDICT -from tapalette import palette_blocks, block_colors, expandable_blocks, \ - content_blocks, block_names, block_primitives, block_styles, \ - special_block_colors -from tasprite_factory import SVG, svg_str_to_pixbuf +from taconstants import (EXPANDABLE, EXPANDABLE_ARGS, OLD_NAMES, CONSTANTS, + STANDARD_STROKE_WIDTH, BLOCK_SCALE, BOX_COLORS, + GRADIENT_COLOR, EXPANDABLE_FLOW, COLORDICT) +from tapalette import (palette_blocks, block_colors, expandable_blocks, + content_blocks, block_names, block_primitives, + block_styles, special_block_colors) +from tasprite_factory import (SVG, svg_str_to_pixbuf) import sprites -from tautils import debug_output, error_output +from tautils import (debug_output, error_output) class Blocks: diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index a040e4c..1d07784 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -28,8 +28,8 @@ import pango import cairo import pangocairo -from tautils import image_to_base64, get_path, data_to_string, round_int, \ - debug_output +from tautils import (image_to_base64, get_path, data_to_string, round_int, + debug_output) from taconstants import COLORDICT diff --git a/TurtleArt/taexportlogo.py b/TurtleArt/taexportlogo.py index 7fea030..7d7d1cb 100644 --- a/TurtleArt/taexportlogo.py +++ b/TurtleArt/taexportlogo.py @@ -1,4 +1,4 @@ -#Copyright (c) 2008-11, Walter Bender +#Copyright (c) 2008-13, Walter Bender #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -24,8 +24,9 @@ try: except: HAS_DATASTORE = False -from TurtleArt.tapalette import logo_commands, logo_functions -from TurtleArt.taconstants import TITLEXY, CONSTANTS +from TurtleArt.tapalette import (logo_commands, logo_functions) +from TurtleArt.taconstants import (TITLEXY, CONSTANTS) + def save_logo(tw): """ Set up the Turtle Art color palette and color processing. """ diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 316b314..158857a 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- #Copyright (c) 2007-8, Playful Invention Company. -#Copyright (c) 2008-12, Walter Bender +#Copyright (c) 2008-13, Walter Bender #Copyright (c) 2008-10, Raúl Gutiérrez Segalés #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -33,10 +33,10 @@ try: except ImportError: GRID_CELL_SIZE = 55 -from taconstants import TAB_LAYER, DEFAULT_SCALE, PREFIX_DICTIONARY -from tapalette import block_names, value_blocks -from tautils import get_pixbuf_from_journal, convert, data_from_file, \ - text_media_type, round_int, debug_output, find_group +from taconstants import (TAB_LAYER, DEFAULT_SCALE, PREFIX_DICTIONARY) +from tapalette import (block_names, value_blocks) +from tautils import (get_pixbuf_from_journal, convert, data_from_file, + text_media_type, round_int, debug_output, find_group) try: from util.RtfParser import RtfTextOnly diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py index cac6cfa..2d903e5 100644 --- a/TurtleArt/tapalette.py +++ b/TurtleArt/tapalette.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -#Copyright (c) 2011,12 Walter Bender +#Copyright (c) 2011-13 Walter Bender #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -81,14 +81,14 @@ import gtk try: from sugar.graphics import style - from util.helpbutton import add_section, add_paragraph + from util.helpbutton import (add_section, add_paragraph) GRID_CELL_SIZE = style.GRID_CELL_SIZE HELP_PALETTE = True except ImportError: GRID_CELL_SIZE = 55 HELP_PALETTE = False -from taconstants import EXPANDABLE_STYLE, EXPANDABLE_FLOW +from taconstants import (EXPANDABLE_STYLE, EXPANDABLE_FLOW) from tautils import debug_output from gettext import gettext as _ diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py index 91118de..7acb90e 100644 --- a/TurtleArt/taturtle.py +++ b/TurtleArt/taturtle.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -#Copyright (c) 2010,12 Walter Bender +#Copyright (c) 2010-13 Walter Bender #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal @@ -24,9 +24,9 @@ from math import sin, cos, pi, sqrt import gtk import cairo -from taconstants import TURTLE_LAYER, DEFAULT_TURTLE_COLORS -from tasprite_factory import SVG, svg_str_to_pixbuf -from tacanvas import wrap100, COLOR_TABLE +from taconstants import (TURTLE_LAYER, DEFAULT_TURTLE_COLORS) +from tasprite_factory import (SVG, svg_str_to_pixbuf) +from tacanvas import (wrap100, COLOR_TABLE) from sprites import Sprite from tautils import debug_output diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py index a8e372c..616ba81 100644 --- a/TurtleArt/tautils.py +++ b/TurtleArt/tautils.py @@ -42,8 +42,8 @@ except (ImportError, AttributeError): OLD_SUGAR_SYSTEM = True from StringIO import StringIO -from taconstants import (HIT_HIDE, HIT_SHOW, XO1, XO15, XO175, XO4, - UNKNOWN, MAGICNUMBER, SUFFIX) +from taconstants import (HIT_HIDE, HIT_SHOW, XO1, XO15, XO175, XO4, UNKNOWN, + MAGICNUMBER, SUFFIX) import logging _logger = logging.getLogger('turtleart-activity') @@ -717,7 +717,13 @@ def get_hardware(): elif version == '4': return XO4 else: - return UNKNOWN + # Older systems don't have dmi info + if os.path.exists('/sys/devices/platform/lis3lv02d/position'): + return XO175 + elif os.path.exists('/etc/olpc-release'): + return XO1 + else: + return UNKNOWN def _get_dmi(node): diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 65c65b5..f6df191 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -58,10 +58,10 @@ from tapalette import (palette_names, palette_blocks, expandable_blocks, block_names, content_blocks, default_values, special_names, block_styles, help_strings, hidden_proto_blocks, string_or_number_args, make_palette, palette_name_to_index, palette_init_on_start) -from talogo import LogoCode, primitive_dictionary, logoerror +from talogo import (LogoCode, primitive_dictionary, logoerror) from tacanvas import TurtleGraphics -from tablock import Blocks, Block -from taturtle import Turtles, Turtle +from tablock import (Blocks, Block) +from taturtle import (Turtles, Turtle) from tautils import (magnitude, get_load_name, get_save_name, data_from_file, data_to_file, round_int, get_id, get_pixbuf_from_journal, movie_media_type, audio_media_type, image_media_type, save_picture, @@ -71,8 +71,8 @@ from tautils import (magnitude, get_load_name, get_save_name, data_from_file, get_hardware, debug_output, error_output, convert, find_bot_block, restore_clamp, collapse_clamp, data_from_string, increment_name, get_screen_dpi) -from tasprite_factory import SVG, svg_str_to_pixbuf, svg_from_file -from sprites import Sprites, Sprite +from tasprite_factory import (SVG, svg_str_to_pixbuf, svg_from_file) +from sprites import (Sprites, Sprite) if GST_AVAILABLE: from tagplay import stop_media diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index b5b357b..1de91d7 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -1,5 +1,5 @@ #Copyright (c) 2007, Playful Invention Company -#Copyright (c) 2008-12, Walter Bender +#Copyright (c) 2008-13, Walter Bender #Copyright (c) 2009-10 Raul Gutierrez Segales #Copyright (c) 2012 Alan Aguiar @@ -33,14 +33,14 @@ _logger = logging.getLogger('turtleart-activity') from sugar.activity import activity try: # 0.86 toolbar widgets - from sugar.activity.widgets import ActivityToolbarButton, StopButton - from sugar.graphics.toolbarbox import ToolbarBox, ToolbarButton + from sugar.activity.widgets import (ActivityToolbarButton, StopButton) + from sugar.graphics.toolbarbox import (ToolbarBox, ToolbarButton) HAS_TOOLBARBOX = True except ImportError: HAS_TOOLBARBOX = False from sugar.graphics.toolbutton import ToolButton from sugar.graphics.radiotoolbutton import RadioToolButton -from sugar.graphics.alert import ConfirmationAlert, NotifyAlert +from sugar.graphics.alert import (ConfirmationAlert, NotifyAlert) from sugar.graphics import style from sugar.datastore import datastore from sugar import profile @@ -54,18 +54,18 @@ import tempfile from gettext import gettext as _ -from TurtleArt.tapalette import palette_names, help_strings, help_palettes, \ - help_windows -from TurtleArt.taconstants import BLOCK_SCALE, XO1, XO15, XO175, \ - XO30, XO4, MIMETYPE +from TurtleArt.tapalette import (palette_names, help_strings, help_palettes, + help_windows) +from TurtleArt.taconstants import (BLOCK_SCALE, XO1, XO15, XO175, XO30, XO4, + MIMETYPE) from TurtleArt.taexportlogo import save_logo -from TurtleArt.tautils import data_to_file, data_to_string, data_from_string, \ - get_path, chooser, get_hardware +from TurtleArt.tautils import (data_to_file, data_to_string, data_from_string, + get_path, chooser, get_hardware) from TurtleArt.tawindow import TurtleArtWindow from TurtleArt.tacollaboration import Collaboration if HAS_TOOLBARBOX: - from util.helpbutton import HelpButton, add_section, add_paragraph + from util.helpbutton import (HelpButton, add_section, add_paragraph) class TurtleArtActivity(activity.Activity): @@ -619,9 +619,7 @@ class TurtleArtActivity(activity.Activity): self._toolbox.toolbar.insert(self._help_button, -1) self._help_button.show() - if not self.tw.hw in [XO30]: - self._add_separator(self._toolbox.toolbar, expand=True, - visible=False) + self._add_separator(self._toolbox.toolbar, expand=True, visible=False) stop_button = StopButton(self) stop_button.props.accelerator = 'Q' @@ -756,7 +754,7 @@ class TurtleArtActivity(activity.Activity): self.share_button = self._add_button('shareoff', _('Sharing blocks disabled'), self._share_cb, toolbar) - if self.has_toolbarbox and gtk.gdk.screen_width() < 1024: + if self.has_toolbarbox: self._add_separator(toolbar, expand=False, visible=True) save_load_button = self._add_button( 'save-load', _('Save/Load'), self._save_load_palette_cb, diff --git a/activity/activity.info b/activity/activity.info index 8a5190d..10d8de0 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = TurtleBlocks -activity_version = 171 +activity_version = 172 license = MIT bundle_id = org.laptop.TurtleArtActivity exec = sugar-activity TurtleArtActivity.TurtleArtActivity diff --git a/samples/sensors-valentine.ta b/samples/sensors-valentine.ta index 8245b1f..e25992a 100644 --- a/samples/sensors-valentine.ta +++ b/samples/sensors-valentine.ta @@ -1,112 +1,107 @@ -[[0, ["start", 2.0], 760, 100, [null, 55]], -[1, "hat1", 780, 260, [null, 106]], -[2, "hat2", 120, 200, [null, 80]], -[3, "setcolor", 1101, 988, [51, 4, 16]], -[4, ["number", 0], 1178, 988, [3, null]], -[5, "stack1", 1101, 694, [17, 62]], -[6, "volume", 1169, 568, [23, null]], -[7, ["forever", 357], 1083, 324, [102, 29, 103]], -[8, "penup", 763, 358, [67, 101]], -[9, "pendown", 763, 442, [101, 70]], -[10, "penup", 763, 526, [70, 75]], -[11, "pendown", 763, 694, [78, 107]], -[12, "clean", 883, 324, [104, 13]], -[13, ["fillscreen", 0], 883, 366, [12, 15, 14, 35]], -[14, ["number", 80], 965, 408, [13, null]], -[15, "white", 965, 366, [13, null]], -[16, "stack1", 1101, 1030, [3, 42]], -[17, "setcolor", 1101, 652, [64, 18, 5]], -[18, "white", 1178, 652, [17, null]], -[19, ["storein", 0], 1101, 442, [29, 20, 27, 23]], -[20, ["string", "b"], 1169, 442, [19, null]], -[21, ["storein", 0], 883, 534, [35, 22, 41, 38]], -[22, ["string", "b"], 951, 534, [21, null]], -[23, ["storein", 0], 1101, 526, [19, 24, 6, 64]], -[24, ["string", "a"], 1169, 526, [23, null]], -[25, "box", 1219, 904, [63, 26, null]], -[26, ["string", "a"], 1274, 904, [25, null]], -[27, "box", 1169, 484, [19, 28, null]], -[28, ["string", "a"], 1224, 484, [27, null]], -[29, ["storein", 0], 1101, 358, [7, 30, 31, 19]], -[30, ["string", "c"], 1169, 358, [29, null]], -[31, "box", 1169, 400, [29, 32, null]], -[32, ["string", "b"], 1224, 400, [31, null]], -[33, "box", 1219, 610, [64, 34, null]], -[34, ["string", "c"], 1274, 610, [33, null]], -[35, ["storein", 0], 883, 450, [13, 36, 37, 21]], -[36, ["string", "a"], 951, 450, [35, null]], -[37, ["number", 0], 951, 492, [35, null]], -[38, ["storein", 0], 883, 618, [21, 39, 40, 105]], -[39, ["string", "c"], 951, 618, [38, null]], -[40, ["number", 0], 951, 660, [38, null]], -[41, ["number", 0], 951, 576, [21, null]], -[42, "wait", 1101, 1072, [16, 43, null]], -[43, ["number", 0.1], 1159, 1072, [42, null]], -[44, "setshade", 1101, 778, [62, 45, 46]], -[45, ["number", 75], 1186, 778, [44, null]], -[46, "setcolor", 1101, 820, [44, 47, 50]], -[47, ["number", 0], 1178, 820, [46, null]], -[48, "box", 1219, 736, [62, 49, null]], -[49, ["string", "b"], 1274, 736, [48, null]], -[50, "stack1", 1101, 862, [46, 63]], -[51, "setshade", 1101, 946, [63, 52, 3]], -[52, ["number", 50], 1186, 946, [51, null]], -[53, "hat", 900, 260, [null, 54, 104]], -[54, ["string", "setup"], 958, 272, [53, null]], -[55, "stack", 760, 146, [0, 56, 59]], -[56, ["string", "setup"], 818, 146, [55, null]], -[57, "hat", 1100, 260, [null, 58, 102]], -[58, ["string", "loop"], 1158, 272, [57, null]], -[59, "stack", 760, 188, [55, 60, null]], -[60, ["string", "loop"], 818, 188, [59, null]], -[61, "box1", 935, 316, [71, null]], -[62, "storeinbox1", 1101, 736, [5, 48, 44]], -[63, "storeinbox1", 1101, 904, [50, 25, 51]], -[64, "storeinbox1", 1101, 610, [23, 33, 17]], -[65, "forward", 120, 330, [80, 82, 99]], -[66, "box2", 178, 288, [80, null]], -[67, "storeinbox2", 763, 316, [106, 71, 8]], -[68, "box2", 245, 330, [82, null]], -[69, "box2", 888, 400, [73, null]], -[70, "stack2", 763, 484, [9, 10]], -[71, ["division2", 0], 881, 316, [67, 61, 72]], -[72, ["number", 2], 959, 358, [71, null]], -[73, ["division2", 0], 834, 400, [101, 69, 74]], -[74, ["number", 2], 912, 442, [73, null]], -[75, ["setxy2", 0], 763, 568, [10, 76, 77, 78]], -[76, ["number", 0], 821, 568, [75, null]], -[77, ["number", 0], 821, 610, [75, null]], -[78, "seth", 763, 652, [75, 79, 11]], -[79, ["number", 0], 821, 652, [78, null]], -[80, ["arc", 0], 120, 246, [2, 81, 66, 65]], -[81, ["number", 225], 178, 246, [80, null]], -[82, ["product2", 0], 191, 330, [65, 68, 85]], -[83, "sqrt", 299, 414, [85, 84]], -[84, ["number", 2], 353, 414, [83, null]], -[85, ["product2", 0], 245, 372, [82, 86, 83]], -[86, ["number", 1.7], 299, 372, [85, null]], -[87, ["arc", 0], 120, 620, [100, 88, 89, null]], -[88, ["number", 225], 178, 620, [87, null]], -[89, "box2", 178, 662, [87, null]], -[90, "right", 120, 454, [99, 91, 92]], -[91, ["number", 90], 178, 454, [90, null]], -[92, "forward", 120, 496, [90, 93, 100]], -[93, ["product2", 0], 191, 496, [92, 94, 95]], -[94, "box2", 245, 496, [93, null]], -[95, ["product2", 0], 245, 538, [93, 96, 97]], -[96, ["number", 1.7], 299, 538, [95, null]], -[97, "sqrt", 299, 580, [95, 98]], -[98, ["number", 2], 353, 580, [97, null]], -[99, ["vspace", 20], 120, 372, [65, 90]], -[100, ["vspace", 20], 120, 538, [92, 87]], -[101, "forward", 763, 400, [8, 73, 9]], -[102, "sandwichclampcollapsed", 1100, 314, [57, 7, null]], -[103, ["vspace", 1], 1083, 1132, [7, null]], -[104, "sandwichclampcollapsed", 900, 314, [53, 12, null]], -[105, ["vspace", 1], 883, 702, [38, null]], -[106, "sandwichclampcollapsed", 780, 306, [1, 67, null]], -[107, ["vspace", 1], 763, 736, [11, null]], -[108, "heading", 584, 543, [null, null]], -[109, "xcor", 609, 488, [null, null]], -[110, "ycor", 766, 566, [null, null]], -[-1, ["turtle", "Yertle"], 0.0, 0.0, 0.0, 0.0, 50.0, 5]] \ No newline at end of file +[[0, ["start", 2.0], 260, 240, [null, 51]], +[1, "hat1", 140, 240, [null, 100]], +[2, "hat2", 17, 240, [null, 101]], +[3, "setcolor", 21, 1208, [59, 103, 15]], +[4, "stack1", 21, 956, [16, 58]], +[5, "volume", 142, 788, [104, null]], +[6, ["forever", 357], 3, 544, [98, 28, null]], +[7, "penup", 158, 362, [63, 97]], +[8, "pendown", 158, 446, [97, 66]], +[9, "penup", 158, 530, [66, 71]], +[10, "pendown", 158, 698, [74, null]], +[11, "clean", 3, 424, [99, 12]], +[12, ["fillscreen", 0], 3, 466, [11, 14, 13, 34]], +[13, ["number", 80], 84, 508, [12, null]], +[14, "white", 84, 466, [12, null]], +[15, "stack1", 21, 1250, [3, 41]], +[16, "setcolor", 21, 914, [60, 17, 4]], +[17, "white", 98, 914, [16, null]], +[18, ["storein", 0], 21, 662, [28, 19, 26, 22]], +[19, ["string", "b"], 88, 662, [18, null]], +[20, ["storein", 0], 3, 634, [34, 21, 40, 37]], +[21, ["string", "b"], 70, 634, [20, null]], +[22, ["storein", 0], 21, 746, [18, 23, 104, 106]], +[23, ["string", "a"], 88, 746, [22, null]], +[24, "box", 138, 1166, [59, 25, null]], +[25, ["string", "a"], 192, 1166, [24, null]], +[26, "box", 88, 704, [18, 27, null]], +[27, ["string", "a"], 142, 704, [26, null]], +[28, ["storein", 0], 21, 578, [6, 29, 30, 18]], +[29, ["string", "c"], 88, 578, [28, null]], +[30, "box", 88, 620, [28, 31, null]], +[31, ["string", "b"], 142, 620, [30, null]], +[32, "box", 138, 872, [60, 33, null]], +[33, ["string", "c"], 192, 872, [32, null]], +[34, ["storein", 0], 3, 550, [12, 35, 36, 20]], +[35, ["string", "a"], 70, 550, [34, null]], +[36, ["number", 0], 70, 592, [34, null]], +[37, ["storein", 0], 3, 718, [20, 38, 39, null]], +[38, ["string", "c"], 70, 718, [37, null]], +[39, ["number", 0], 70, 760, [37, null]], +[40, ["number", 0], 70, 676, [20, null]], +[41, "wait", 21, 1292, [15, 42, null]], +[42, ["number", 0.1], 79, 1292, [41, null]], +[43, "setshade", 21, 1082, [45, 44, 48]], +[44, ["number", 75], 106, 1082, [43, null]], +[45, "setcolor", 21, 1040, [58, 102, 43]], +[46, "box", 138, 998, [58, 47, null]], +[47, ["string", "b"], 192, 998, [46, null]], +[48, "stack1", 21, 1124, [43, 59]], +[49, "hat", 20, 360, [null, 50, 99]], +[50, ["string", "setup"], 78, 372, [49, null]], +[51, "stack", 260, 286, [0, 52, 55]], +[52, ["string", "setup"], 318, 286, [51, null]], +[53, "hat", 20, 480, [null, 54, 98]], +[54, ["string", "loop"], 78, 492, [53, null]], +[55, "stack", 260, 328, [51, 56, null]], +[56, ["string", "loop"], 318, 328, [55, null]], +[57, "box1", 329, 320, [67, null]], +[58, "storeinbox1", 21, 998, [4, 46, 45]], +[59, "storeinbox1", 21, 1166, [48, 24, 3]], +[60, "storeinbox1", 21, 872, [106, 32, 16]], +[61, "forward", 0, 380, [76, 78, 95]], +[62, "box2", 58, 338, [76, null]], +[63, "storeinbox2", 158, 320, [100, 67, 7]], +[64, "box2", 124, 380, [78, null]], +[65, "box2", 282, 404, [69, null]], +[66, "stack2", 158, 488, [8, 9]], +[67, ["division2", 0], 275, 320, [63, 57, 68]], +[68, ["number", 2], 353, 362, [67, null]], +[69, ["division2", 0], 228, 404, [97, 65, 70]], +[70, ["number", 2], 306, 446, [69, null]], +[71, ["setxy2", 0], 158, 572, [9, 72, 73, 74]], +[72, ["number", 0], 216, 572, [71, null]], +[73, ["number", 0], 216, 614, [71, null]], +[74, "seth", 158, 656, [71, 75, 10]], +[75, ["number", 0], 216, 656, [74, null]], +[76, ["arc", 0], 0, 296, [101, 77, 62, 61]], +[77, ["number", 225], 58, 296, [76, null]], +[78, ["product2", 0], 70, 380, [61, 64, 81]], +[79, "sqrt", 178, 464, [81, 80]], +[80, ["number", 2], 232, 464, [79, null]], +[81, ["product2", 0], 124, 422, [78, 82, 79]], +[82, ["number", 1.7], 178, 422, [81, null]], +[83, ["arc", 0], 0, 670, [96, 84, 85, null]], +[84, ["number", 225], 58, 670, [83, null]], +[85, "box2", 58, 712, [83, null]], +[86, "right", 0, 504, [95, 87, 88]], +[87, ["number", 90], 58, 504, [86, null]], +[88, "forward", 0, 546, [86, 89, 96]], +[89, ["product2", 0], 70, 546, [88, 90, 91]], +[90, "box2", 124, 546, [89, null]], +[91, ["product2", 0], 124, 588, [89, 92, 93]], +[92, ["number", 1.7], 178, 588, [91, null]], +[93, "sqrt", 178, 630, [91, 94]], +[94, ["number", 2], 232, 630, [93, null]], +[95, ["vspace", 20], 0, 422, [61, 86]], +[96, ["vspace", 20], 0, 588, [88, 83]], +[97, "forward", 158, 404, [7, 69, 8]], +[98, "sandwichclampcollapsed", 20, 534, [53, 6, null]], +[99, "sandwichclampcollapsed", 20, 414, [49, 11, null]], +[100, "sandwichclampcollapsed", 140, 286, [1, 63, null]], +[101, "sandwichclampcollapsed", 17, 286, [2, 76, null]], +[102, "red", 98, 1040, [45, null]], +[103, "red", 98, 1208, [3, null]], +[104, ["division2", 0], 88, 788, [22, 5, 105]], +[105, ["number", 4], 166, 830, [104, null]], +[106, ["vspace", 0], 21, 830, [22, 60]]] diff --git a/turtleblocks.py b/turtleblocks.py index 19da326..4fe4800 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python #Copyright (c) 2007-8, Playful Invention Company -#Copyright (c) 2008-12, Walter Bender +#Copyright (c) 2008-13, Walter Bender #Copyright (c) 2011 Collabora Ltd. #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -47,9 +47,9 @@ sys.argv[1:] = [] # Execution of import gst cannot see '--help' or '-h' import gettext -from TurtleArt.taconstants import OVERLAY_LAYER, DEFAULT_TURTLE_COLORS, \ - TAB_LAYER, SUFFIX -from TurtleArt.tautils import data_to_string, data_from_string, get_save_name +from TurtleArt.taconstants import (OVERLAY_LAYER, DEFAULT_TURTLE_COLORS, + TAB_LAYER, SUFFIX) +from TurtleArt.tautils import (data_to_string, data_from_string, get_save_name) from TurtleArt.tawindow import TurtleArtWindow from TurtleArt.taexportlogo import save_logo -- cgit v0.9.1