CatapultServer  v0.5.0.1 (Elephant)
colorama.ansitowin32.AnsiToWin32 Class Reference
Inheritance diagram for colorama.ansitowin32.AnsiToWin32:
Collaboration diagram for colorama.ansitowin32.AnsiToWin32:

Public Member Functions

def __init__ (self, wrapped, convert=None, strip=None, autoreset=False)
 
def should_wrap (self)
 
def get_win32_calls (self)
 
def write (self, text)
 
def reset_all (self)
 
def write_and_convert (self, text)
 
def write_plain_text (self, text, start, end)
 
def convert_ansi (self, paramstring, command)
 
def extract_params (self, command, paramstring)
 
def call_win32 (self, command, params)
 
def convert_osc (self, text)
 

Public Attributes

 wrapped
 
 autoreset
 
 stream
 
 strip
 
 convert
 
 win32_calls
 
 on_stderr
 

Static Public Attributes

 ANSI_CSI_RE = re.compile('\001?\033\[((?:\d|;)*)([a-zA-Z])\002?')
 
 ANSI_OSC_RE = re.compile('\001?\033\]((?:.|;)*?)(\x07)\002?')
 

Detailed Description

Implements a 'write()' method which, on Windows, will strip ANSI character
sequences from the text, and if outputting to a tty, will convert them into
win32 function calls.

Constructor & Destructor Documentation

◆ __init__()

def colorama.ansitowin32.AnsiToWin32.__init__ (   self,
  wrapped,
  convert = None,
  strip = None,
  autoreset = False 
)

Member Function Documentation

◆ call_win32()

def colorama.ansitowin32.AnsiToWin32.call_win32 (   self,
  command,
  params 
)
Here is the caller graph for this function:

◆ convert_ansi()

def colorama.ansitowin32.AnsiToWin32.convert_ansi (   self,
  paramstring,
  command 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_osc()

def colorama.ansitowin32.AnsiToWin32.convert_osc (   self,
  text 
)
Here is the caller graph for this function:

◆ extract_params()

def colorama.ansitowin32.AnsiToWin32.extract_params (   self,
  command,
  paramstring 
)
Here is the caller graph for this function:

◆ get_win32_calls()

def colorama.ansitowin32.AnsiToWin32.get_win32_calls (   self)

◆ reset_all()

def colorama.ansitowin32.AnsiToWin32.reset_all (   self)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_wrap()

def colorama.ansitowin32.AnsiToWin32.should_wrap (   self)
True if this class is actually needed. If false, then the output
stream will not be affected, nor will win32 calls be issued, so
wrapping stdout is not actually required. This will generally be
False on non-Windows platforms, unless optional functionality like
autoreset has been requested using kwargs to init()

◆ write()

def colorama.ansitowin32.AnsiToWin32.write (   self,
  text 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_and_convert()

def colorama.ansitowin32.AnsiToWin32.write_and_convert (   self,
  text 
)
Write the given text to our wrapped stream, stripping any ANSI
sequences from the text, and optionally converting them into win32
calls.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_plain_text()

def colorama.ansitowin32.AnsiToWin32.write_plain_text (   self,
  text,
  start,
  end 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ANSI_CSI_RE

colorama.ansitowin32.AnsiToWin32.ANSI_CSI_RE = re.compile('\001?\033\[((?:\d|;)*)([a-zA-Z])\002?')
static

◆ ANSI_OSC_RE

colorama.ansitowin32.AnsiToWin32.ANSI_OSC_RE = re.compile('\001?\033\]((?:.|;)*?)(\x07)\002?')
static

◆ autoreset

colorama.ansitowin32.AnsiToWin32.autoreset

◆ convert

colorama.ansitowin32.AnsiToWin32.convert

◆ on_stderr

colorama.ansitowin32.AnsiToWin32.on_stderr

◆ stream

colorama.ansitowin32.AnsiToWin32.stream

◆ strip

colorama.ansitowin32.AnsiToWin32.strip

◆ win32_calls

colorama.ansitowin32.AnsiToWin32.win32_calls

◆ wrapped

colorama.ansitowin32.AnsiToWin32.wrapped

The documentation for this class was generated from the following file: