Revision: 4473
Author: russblau
Date: 2007-10-19 12:52:12 +0000 (Fri, 19 Oct 2007)
Log Message:
-----------
Daniel, please test your code before committing. ;)
Modified Paths:
--------------
trunk/pywikipedia/userinterfaces/terminal_interface.py
Modified: trunk/pywikipedia/userinterfaces/terminal_interface.py
===================================================================
--- trunk/pywikipedia/userinterfaces/terminal_interface.py 2007-10-19 10:47:17 UTC (rev
4472)
+++ trunk/pywikipedia/userinterfaces/terminal_interface.py 2007-10-19 12:52:12 UTC (rev
4473)
@@ -18,7 +18,7 @@
def getDefaultTextColorInWindows():
"""
This method determines the default text color and saves its color
- code inside the variable self._windowsDefaultColor.
+ code inside the variable windowsColors['default'].
Based on MIT-licensed code by Andre Burgaud published at
http://starship.python.net/crew/theller/wiki/ColorConsole
@@ -143,7 +143,7 @@
# print the rest of the text
targetStream.write(text.encode(config.console_encoding, 'replace'))
# just to be sure, reset the color
- ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle,
_windowsDefaultColor)
+ ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle,
windowsColors['default'])
else:
# ctypes is only available since Python 2.5, and we won't
# try to colorize without it. Instead we add *** after the text as a whole