session.py 文件源码

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

项目:ifictionbot 作者: ykrivopalov 项目源码 文件源码
def start(self, path, game):
        info("chat %s: frob start", self._chat_id)
        self._process = await asyncio.create_subprocess_shell(
            'frob -iplain {}/{}.gam'.format(path, game),
            stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.STDOUT, preexec_fn=os.setpgrp)

        if os.path.exists(path + '/last.sav'):
            await self._read_output()  # just ignore all previous output
            self.restore_game('last')
        else:
            self._messages_to_skip = 1  # ignore frobTADS intro msg
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号