def _tparm(self, arg, index): import curses return curses.tparm(to_bytes(arg), index).decode('ascii') or ''