diff frontends/src/wix/card_game.py @ 1011:5a6354ff468c

wix: use of new logging system
author Goffi <goffi@goffi.org>
date Mon, 05 May 2014 20:12:21 +0200
parents 36c6495d86b0
children e2e1e27a3680
line wrap: on
line diff
--- a/frontends/src/wix/card_game.py	Mon May 05 20:12:19 2014 +0200
+++ b/frontends/src/wix/card_game.py	Mon May 05 20:12:21 2014 +0200
@@ -18,13 +18,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-
 from sat.core.i18n import _
 import wx
 import os.path, glob
-import pdb
-from logging import debug, info, error
-from sat.tools.jid  import JID
+from sat.core.log import getLogger
+log = getLogger(__name__)
 from sat_frontends.tools.games import TarotCard
 from sat_frontends.quick_frontend.quick_card_game import QuickCardGame
 from sat_frontends.wix.xmlui import XMLUI
@@ -34,6 +32,7 @@
 MIN_WIDTH = 950 #Minimum size of the panel
 MIN_HEIGHT = 500
 
+
 class WxCard(TarotCard):
     """This class is used to represent a card, graphically and logically"""
 
@@ -43,7 +42,7 @@
         root_name = os.path.splitext(os.path.basename(file))[0]
         suit,value = root_name.split('_')
         TarotCard.__init__(self, (suit, value))
-        print "Carte:",suit, value #, self.bout
+        log.debug("Card: %s %s" % (suit, value)) #, self.bout
 
     def draw(self, dc, x, y):
         """Draw the card on the device context
@@ -97,7 +96,7 @@
     def contratSelected(self, data):
         """Called when the contrat has been choosed
         @param data: form result"""
-        debug (_("Contrat choosed"))
+        log.debug (_("Contrat choosed"))
         contrat = data[0][1]
         QuickCardGame.contratSelected(self, contrat)
 
@@ -211,7 +210,7 @@
             self.Refresh()
 
     def onMouseClick(self, event):
-        print "mouse click:",event.GetPosition()
+        log.debug("mouse click: %s" % event.GetPosition())
         pos_x,pos_y = event.GetPosition()
 
         if self.state == "chien":