summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-06 00:37:07 +0100
committerhut <hut@lavabit.com>2010-01-06 00:37:07 +0100
commitfca1fc4f52502559d2acd4b5a077fdc849a187d9 (patch)
tree6c9a327aa9f843954ff57d33471844d7844c7971
parent9ec914e306514c7a6f0cf3d401e97712dc197501 (diff)
downloadranger-fca1fc4f52502559d2acd4b5a077fdc849a187d9.tar.gz
color: added docstring
-rw-r--r--TODO1
-rw-r--r--ranger/gui/color.py18
2 files changed, 17 insertions, 2 deletions
diff --git a/TODO b/TODO
index b3475548..baae6763 100644
--- a/TODO
+++ b/TODO
@@ -35,3 +35,4 @@ Bugs
 Ideas
 
    ( ) #20  10/01/01  use inotify to monitor filesystem changes
+   ( ) #24  10/01/06  progress bar
diff --git a/ranger/gui/color.py b/ranger/gui/color.py
index 1318ab6f..bf80929a 100644
--- a/ranger/gui/color.py
+++ b/ranger/gui/color.py
@@ -1,10 +1,24 @@
-"""Contains abbreviations to curses' color/attribute constants."""
+"""
+Contains abbreviations to curses color/attribute constants.
+
+Multiple attributes can be combined with the | (or) operator, toggled
+with ^ (xor) and checked for with & (and). Examples:
+
+attr = bold | underline
+attr |= reverse
+bool(attr & reverse) # => True
+attr ^= reverse
+bool(attr & reverse) # => False
+"""
+
 import curses
 
 COLOR_PAIRS = {10: 0}
 
 def get_color(fg, bg):
-	"""Returns the color pair for the given fg/bg combination."""
+	"""
+	Returns the curses color pair for the given fg/bg combination.
+	"""
 
 	c = bg+2 + 9*(fg + 2)