watch.py 文件源码

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

项目:aiohttp-devtools 作者: aio-libs 项目源码 文件源码
def _start_process(self):
        act = 'Start' if self._reloads == 0 else 'Restart'
        logger.info('%sing dev server at http://%s:%s ?', act, self._config.host, self._config.main_port)

        try:
            tty_path = os.ttyname(sys.stdin.fileno())
        except OSError:  # pragma: no branch
            # fileno() always fails with pytest
            tty_path = '/dev/tty'
        except AttributeError:
            # on windows, without a windows machine I've no idea what else to do here
            tty_path = None

        self._process = Process(target=serve_main_app, args=(self._config, tty_path))
        self._process.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号