def handler(esc, f): b = read.ucb(f) if DEBUG: print 'DRCS {:#x}'.format(b) if in_code_set_table(b): esc._args.append(b) else: #return code_set_from_final_byte(b, f) raise DecodingError()
def handler(esc, f): b = read.ucb(f) if in_code_set_table(b): esc._args.append(b) #return code_set_from_final_byte(b, f) elif b in DESIGNATION_TABLE: esc._args.append(b) d = DESIGNATION_TABLE[b]() d.load(esc, f) else: raise DecodingError()
def load(self, esc, f): b = read.ucb(f) if b == DRCS.CODE: if DEBUG: print 'G3 DRCS {:#x}'.format(b) esc._args.append(b) DRCS.handler(esc, f) elif in_code_set_table(b): if DEBUG: print 'G3 CODESET {:#x}'.format(b) esc._args.append(b) else: raise DecodingError()