process_controller.py 文件源码

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

项目:SublimeTerm 作者: percevalw 项目源码 文件源码
def keep_reading(self):
        """Output thread method for the process

        Sends the process output to the ViewController (through OutputTranscoder)
        """
        while True:
            if self.stop:
                break
            ret = self.process.poll()
            if ret is not None:
                self.stop = True
            readable, writable, executable = select.select([self.master], [], [], 5)
            if readable:
                """ We read the new content """
                data = os.read(self.master, 1024)
                text = data.decode('UTF-8', errors='replace')
                log_debug("RAW", repr(text))
                log_debug("PID", os.getenv('BASHPID'))
                self.output_transcoder.decode(text)
            #                log_debug("{} >> {}".format(int(time.time()), repr(text)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号