From 86fb7c561cc6b10b473731c966a7ae4097df0f3d Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sun, 16 Jan 2011 22:46:38 -0800 Subject: Move color codes to a new file. Add some message string constants --- layman/constants.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ layman/debug.py | 22 ++++++++-------------- 2 files changed, 53 insertions(+), 14 deletions(-) create mode 100644 layman/constants.py diff --git a/layman/constants.py b/layman/constants.py new file mode 100644 index 0000000..7fc72ea --- /dev/null +++ b/layman/constants.py @@ -0,0 +1,45 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +################################################################################# +# LAYMAN CONSTANTS +################################################################################# +# File: constants.py +# +# Handles layman actions via the command line interface. +# +# Copyright: +# (c) 2010 - 2011 +# Gunnar Wrobel +# Brian Dolbec +# Distributed under the terms of the GNU General Public License v2 +# +# Author(s): +# Gunnar Wrobel +# Brian Dolbec ', 'Control the debugging features of ' @@ -307,6 +297,8 @@ class Message: def info (self, info, level = 4): + #print "info =", info + if type(info) not in types.StringTypes: info = str(info) @@ -346,6 +338,8 @@ class Message: def warn (self, warn, level = 4): + #print "DEBUG.warn()" + if type(warn) not in types.StringTypes: warn = str(warn) @@ -453,7 +447,7 @@ class Message: ## Remove printed characters from output x = x[60:] ## Print final line - print >> self.debug_out, ls + '// ' + x + print >> self.debug_out, ls + '// ' + x if self.debug_vrb == 1: # Top line indicates class and method -- cgit v1.2.3-65-gdbad