1.8K Star 3.1K Fork 4.3K

GVPMindSpore/mindquantum

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mindquantum.utils.fdopen.rst 570 Bytes
一键复制 编辑 原始数据 按行查看 历史
donghufeng 提交于 2023-11-01 01:16 +08:00 . re-organize docs

mindquantum.utils.fdopen

.. py:function:: mindquantum.utils.fdopen(fname, mode, perms=0o600, encoding=None)

    以正确权限打开文件的上下文管理器。

    参数:
        - **fname** (str) - 需要读写的文件的路径。
        - **mode** (str) - 以何种方式打开文件(查询内置函数 `open()` 进行更多帮助)。
        - **perms** (int) - 权限掩码(查询 `os.open()` 进行更多帮助)。
        - **encoding** (str) - 对文件进行编码或者解码的编码器。默认值: ``None``。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mindspore/mindquantum.git
git@gitee.com:mindspore/mindquantum.git
mindspore
mindquantum
mindquantum
master

搜索帮助