Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-09-23 11:32:50 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-09-23 11:32:50 (GMT)
commitc71de86dadd704c1c2ca2e2640f748797b6b0d67 (patch)
tree2f8fc9e2083c67e16bbf3772e3d19325c61fcaaf
parentfa5457e6bda855e7cc51be768421091999580cea (diff)
using logger instead of print to report debug messages
-rw-r--r--TurtleArt/tablock.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index 775929d..5ca6ed0 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -20,6 +20,9 @@
#THE SOFTWARE.
import gtk
+
+from gettext import gettext as _
+
from taconstants import EXPANDABLE, EXPANDABLE_BLOCKS, EXPANDABLE_ARGS, \
PRIMITIVES, OLD_NAMES, BLOCK_SCALE, BLOCK_NAMES, CONTENT_BLOCKS, \
PALETTES, COLORS, BASIC_STYLE_HEAD, BASIC_STYLE_HEAD_1ARG, \
@@ -34,11 +37,11 @@ from taconstants import EXPANDABLE, EXPANDABLE_BLOCKS, EXPANDABLE_ARGS, \
PORTFOLIO_STYLE_1x1, PORTFOLIO_STYLE_2x1, PORTFOLIO_STYLE_1x2, BOX_COLORS, \
STANDARD_STROKE_WIDTH, SELECTED_STROKE_WIDTH, SELECTED_COLOR, \
BASIC_STYLE_EXTENDED_SMALL
-
-
from tasprite_factory import SVG, svg_str_to_pixbuf
import sprites
-from gettext import gettext as _
+
+import logging
+_logger = logging.getLogger('turtleart-activity')
#
# A class for the list of blocks and everything they share in common
@@ -426,7 +429,8 @@ class Block:
self._make_portfolio_style_1x2(svg)
else:
self._make_basic_style(svg)
- print "WARNING: I don't know how to create a %s block" % (self.name)
+ _logger.debug("WARNING: I don't know how to create a %s block" % \
+ (self.name))
def _set_colors(self, svg):
if self.name in BOX_COLORS: