lib.py 文件源码

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

项目:python-zulip-api 作者: zulip 项目源码 文件源码
def open(self, filepath):
        # type: (str) -> IO[str]
        filepath = os.path.normpath(filepath)
        abs_filepath = os.path.join(self._root_dir, filepath)
        if abs_filepath.startswith(self._root_dir):
            return open(abs_filepath)
        else:
            raise PermissionError("Cannot open file \"{}\". Bots may only access "
                                  "files in their local directory.".format(abs_filepath))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号