def display_ctl_chars(index, cc):
 title = 'Special Character'
 col1_width = len(title)
 col2_width = max(map(len, index.values()))
 FMT = '{idx:<{col1_width}}   {name:<{col2_width}} {value}'
 print('Special line Characters'.center(40).rstrip())
 print(FMT.format(idx='Index', name='Name', value='Value', col1_width=col1_width, col2_width=col2_width))
 print('{0}   {1} {2}'.format(('-' * col1_width), ('-' * col2_width), ('-' * 10)))
 for (index_name, name) in index.items():
  try:
   index = getattr(termios, index_name)
   value = cc[index]
   if (value == '\xff'):
    value = '_POSIX_VDISABLE'
   else:
    value = repr(value)
  except AttributeError:
   value = 'undef'
  print(FMT.format(idx=index_name, name=name, value=value, col1_width=col1_width, col2_width=col2_width))
 print()

def display_ctl_chars ( index , cc ) : title = 'Special Character' col1_width = len ( title ) col2_width = max ( map ( len , index . values ( ) ) ) FMT = '{idx:<{col1_width}}   {name:<{col2_width}} {value}' print ( 'Special line Characters' . center ( 40 ) . rstrip ( ) ) print ( FMT . format ( idx = 'Index' , name = 'Name' , value = 'Value' , col1_width = col1_width , col2_width = col2_width ) ) print ( '{0}   {1} {2}' . format ( ( '-' * col1_width ) , ( '-' * col2_width ) , ( '-' * 10 ) ) ) for ( index_name , name ) in index . items ( ) : try : index = getattr ( termios , index_name ) value = cc [ index ] if ( value == '\xff' ) : value = '_POSIX_VDISABLE' else : value = repr ( value ) except AttributeError : value = 'undef' print ( FMT . format ( idx = index_name , name = name , value = value , col1_width = col1_width , col2_width = col2_width ) ) print ( )
display all control character indicies .