Mercurial > touhou
diff pytouhou/ui/gamerunner.py @ 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 | ee6dfd14a785 |
children | 2d35565b5608 |
line wrap: on
line diff
--- 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