def setterm(self, term):
log.debug("<STR_LIT>" % (term, ))<EOL>curses.setupterm(term) <EOL>self.TERM = term<EOL>self.ESCSEQ = {}<EOL>for k in self.KEYS.keys():<EOL><INDENT>str = curses.tigetstr(curses.has_key._capability_names[k])<EOL>if str:<EOL><INDENT>self.ESCSEQ[str] = k<EOL><DEDENT><DEDENT>self.CODES = self.CODES.copy()<EOL>self.CODES['<STR_LIT>'] = curses.tigetstr('<STR_LIT>')<EOL>self.CODES['<STR_LIT>'] = curses.tigetstr('<STR_LIT>')<EOL>self.CODES['<STR_LIT>'] = curses.tigetstr('<STR_LIT>')<EOL>self.CODES['<STR_LIT>'] = curses.tigetstr('<STR_LIT>')<EOL>self.CODES['<STR_LIT>'] = curses.tigetstr('<STR_LIT>')<EOL>
Set the curses structures for this terminal