@@ -436,15 +436,6 @@ def __init__(self, completekey: str='tab', stdin=None, stdout=None, persistent_h
436436 # Codes used for exit conditions
437437 self ._STOP_AND_EXIT = True # cmd convention
438438
439- self ._colorcodes = {'bold' : {True : '\x1b [1m' , False : '\x1b [22m' },
440- 'cyan' : {True : Fore .CYAN , False : Fore .RESET },
441- 'blue' : {True : Fore .BLUE , False : Fore .RESET },
442- 'red' : {True : Fore .RED , False : Fore .RESET },
443- 'magenta' : {True : Fore .MAGENTA , False : Fore .RESET },
444- 'green' : {True : Fore .GREEN , False : Fore .RESET },
445- 'underline' : {True : '\x1b [4m' , False : Fore .RESET },
446- 'yellow' : {True : Fore .YELLOW , False : Fore .RESET }}
447-
448439 # Used load command to store the current script dir as a LIFO queue to support _relative_load command
449440 self ._script_dir = []
450441
@@ -714,17 +705,6 @@ def ppaged(self, msg: str, end: str='\n', chop: bool=False) -> None:
714705 if self .broken_pipe_warning :
715706 sys .stderr .write (self .broken_pipe_warning )
716707
717- def colorize (self , val : str , color : str ) -> str :
718- """Given a string (``val``), returns that string wrapped in UNIX-style
719- special characters that turn on (and then off) text color and style.
720- If the ``colors`` environment parameter is ``False``, or the application
721- is running on Windows, will return ``val`` unchanged.
722- ``color`` should be one of the supported strings (or styles):
723- red/blue/green/cyan/magenta, bold, underline"""
724- if self .colors .lower () != constants .COLORS_NEVER .lower () and (self .stdout == self .initial_stdout ):
725- return self ._colorcodes [color ][True ] + val + self ._colorcodes [color ][False ]
726- return val
727-
728708 # ----- Methods related to tab completion -----
729709
730710 def reset_completion_defaults (self ) -> None :
0 commit comments