terminator/terminatorlib/util.py

31 lines
1.0 KiB
Python
Raw Normal View History

2009-08-07 09:21:37 +00:00
#!/usr/bin/python
# TerminatorConfig - layered config classes
# Copyright (C) 2006-2008 cmsj@tenshu.net
#
# 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, version 2 only.
#
# 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 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import sys
# set this to true to enable debugging output
debug = False
def dbg (log = ""):
"""Print a message if debugging is enabled"""
if debug:
print >> sys.stderr, log
def err (log = ""):
"""Print an error message"""
print >> sys.stderr, log