From 35c9eb6bd292b2fa03c2f33ae3cf5f8033493708 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 08 Oct 2013 01:26:59 +0000 Subject: cleanup debug output --- (limited to 'TurtleArt') diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py index 7341c3e..6fd347a 100644 --- a/TurtleArt/tapalette.py +++ b/TurtleArt/tapalette.py @@ -129,7 +129,7 @@ class Palette(): def add_palette(self, position=None, init_on_start=False): if self._name is None: - debug_output('You must specify a name for your palette', True) + print 'You must specify a name for your palette' return # Insert new palette just before the trash @@ -145,8 +145,6 @@ class Palette(): if self._name not in palette_names: palette_names.insert(i, self._name) - debug_output('adding %s to palette_i18n_names' % _(self._name), - True) palette_i18n_names.insert(i, _(self._name)) palette_blocks.insert(i, []) block_colors.insert(i, self._colors) @@ -240,7 +238,6 @@ def make_palette(palette_name, colors=None, help_string=None, position=None, def palette_name_to_index(palette_name): ''' Find the index associated with palette_name. ''' - debug_output(palette_name, True) if palette_name in palette_names: return palette_names.index(palette_name) elif palette_name in palette_i18n_names: @@ -276,7 +273,7 @@ class Block(): def add_block(self, position=None): if self._name is None: - debug_output('You must specify a name for your block') + print 'You must specify a name for your block' return # FIXME: Does the block already exist? A block can live on @@ -285,7 +282,7 @@ class Block(): # all lists except palettes before regeneration. if self._style is None: - debug_output('You must specify a style for your block') + print 'You must specify a style for your block' return else: block_styles[self._style].append(self._name) @@ -302,8 +299,8 @@ class Block(): if self._palette is not None: i = palette_names.index(self._palette) if self._name in palette_blocks[i]: - debug_output('%s already in palette %s, skipping...' % - (self._name, self._palette)) + print '%s already in palette %s, skipping...' % \ + (self._name, self._palette) else: if position is not None and isinstance(position, int) and \ position < len(palette_blocks[i]): @@ -311,8 +308,7 @@ class Block(): else: palette_blocks[i].append(self._name) if position is not None: - debug_output('Ignoring position (%s)' % - (str(position))) + print 'Ignoring position (%s)' % (str(position)) if self._help is not None: help_strings[self._name] = self._help @@ -366,7 +362,7 @@ class Block(): def set_palette(self, palette): if not palette in palette_names: - debug_output('Could not find palette %s' % (palette)) + print 'Could not find palette %s' % (palette) else: self._palette = palette @@ -390,7 +386,7 @@ class Block(): def set_style(self, style): if style not in block_styles: - debug_output('Unknown style: %s' % (style)) + print 'Unknown style: %s' % (style) else: self._style = style -- cgit v0.9.1