summaryrefslogtreecommitdiffstats
path: root/layman/constants.py
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2011-01-16 22:46:38 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2011-02-11 02:49:14 -0800
commitb214cd3e79ee70aec597262f5bb9bbaf6fdc74e5 (patch)
tree19ca6b58807489c8f329330fff5797eb1dc1571d /layman/constants.py
parent4fbff6fc56d92aaba151bf2a02d27464425f1644 (diff)
downloadlayman-b214cd3e79ee70aec597262f5bb9bbaf6fdc74e5.tar.gz
layman-b214cd3e79ee70aec597262f5bb9bbaf6fdc74e5.tar.bz2
layman-b214cd3e79ee70aec597262f5bb9bbaf6fdc74e5.zip
Move color codes to a new file.
Add some message string constants
Diffstat (limited to 'layman/constants.py')
-rw-r--r--layman/constants.py45
1 files changed, 45 insertions, 0 deletions
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 <wrobel@gentoo.org>
+# Brian Dolbec <brian.dolbec@gmail.com
+#
+''' Provides the command line actions that can be performed by layman.'''
+
+__version__ = "$Id: constants.py 2011-01-16 23:52 PST Brian Dolbec$"
+
+
+
+
+#################################################################################
+##
+## Color codes (taken from portage)
+##
+#################################################################################
+
+esc_seq = '\x1b['
+
+codes = {}
+codes['reset'] = esc_seq + '39;49;00m'
+codes['red'] = esc_seq + '31;01m'
+codes['green'] = esc_seq + '32;01m'
+codes['yellow'] = esc_seq + '33;01m'
+codes['turquoise'] = esc_seq + '36;01m'
+
+
+NOT_OFFICIAL_MSG = '*** This is not an official gentoo overlay ***\n'
+NOT_SUPPORTED_MSG = '*** You are lacking the necessary tools' +\
+ ' to install this overlay ***\n'