Next / Previous / Contents / Shipman's homepage

11. showIsV(): Display “H” or “V

This function translates the usual orientation code—0 for horizontal, 1 for vertical—to letter “H” or “V” for easier interpretation by humans.

kkck
# - - -   s h o w I s V

def showIsV(isV):
    '''Translate an orientation code

      [ if isV == 0 ->
          return 'H'
        else ->
          return 'V' ]
    '''
    return "HV"[isV]