changeset 224:9bb26dbb8438

Remove useless and occasionally problematic (think about non-utf8 terminals) print calls.
author Thibaut Girka <thib@sitedethib.com>
date Mon, 19 Dec 2011 20:29:30 +0100
parents 98c64ffcbdff
children 2d35565b5608
files eosd pcb pytouhou/ui/gamerunner.py pytouhou/vm/eclrunner.py
diffstat 4 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/eosd
+++ b/eosd
@@ -52,9 +52,6 @@ def main(path, stage_num, rank, characte
     background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,))
     background = Background(stage, background_anm_wrapper)
 
-    # Let's go!
-    print(stage.name)
-
     # Main loop
     runner = GameRunner(resource_loader, game, background, replay=replay)
     runner.start()
--- a/pcb
+++ b/pcb
@@ -38,9 +38,6 @@ def main(path, stage_num, rank, characte
     background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,))
     background = Background(stage, background_anm_wrapper)
 
-    # Let's go!
-    print(stage.name)
-
     # Main loop
     runner = GameRunner(resource_loader, game, background)
     runner.start()
--- a/pytouhou/ui/gamerunner.py
+++ b/pytouhou/ui/gamerunner.py
@@ -23,9 +23,14 @@ from pyglet.gl import (glMatrixMode, glL
                        GL_PERSPECTIVE_CORRECTION_HINT, GL_FOG_HINT, GL_NICEST,
                        GL_COLOR_ARRAY, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY)
 
+from pytouhou.utils.helpers import get_logger
+
 from .gamerenderer import GameRenderer
 
 
+logger = get_logger(__name__)
+
+
 class GameRunner(pyglet.window.Window, GameRenderer):
     def __init__(self, resource_loader, game=None, background=None, replay=None):
         GameRenderer.__init__(self, resource_loader, game, background)
@@ -79,8 +84,7 @@ class GameRunner(pyglet.window.Window, G
         try:
             return pyglet.window.Window._event_text_symbol(self, ev)
         except Exception as exc:
-            print('*WARNING* Pyglet error:')
-            traceback.print_exc(exc)
+            logger.warn('Pyglet error: %s', traceback.format_exc(exc))
             return None, None
 
 
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -719,7 +719,6 @@ class ECLRunner(object):
         self._game.change_bullets_into_star_items()
         self._game.spellcard = number
         self._game.enable_effect()
-        print("%d - %s" % (number+1, name))
 
 
     @instruction(94)