skin.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:slacky 作者: mathiasbc 项目源码 文件源码
def push_chat(self, username, chat):
        """
        write the given string at the correct position
        in the chatarea
        """
        # FIXME: fails when text goes beyond window limit
        # highlight username
        col = curses.color_pair(8)
        self.chatarea.addstr(self.chat_at, 0, username + ':', col)
        # write the actual chat content
        self.chatarea.addstr(chat)
        # update cursor
        self.chat_at, _ = self.chatarea.getyx()
        self.chat_at += 1
        self.chatarea.refresh()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号