# -*- coding: UTF-8 -*- __revision__ = '$Id: gdebug.py 674 2007-01-05 23:01:29Z piotrek $' # Copyright (c) 2005-2007 Vasco Nunes, Piotr Ożarowski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # You may use and distribute this software under the terms of the # GNU General Public License, version 2 or later class GriffithDebug: debug_mode = None def __init__(self, mode=False): self.debug_mode = mode def set_debug(self, mode=True): self.debug_mode = mode def show(self, txt): if self.debug_mode: print txt.encode('utf8')