setopt.py 文件源码

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

项目:threatdetectionservice 作者: flyballlabs 项目源码 文件源码
def config_file(kind="local"):
    """Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    """
    if kind == 'local':
        return 'setup.cfg'
    if kind == 'global':
        return os.path.join(
            os.path.dirname(distutils.__file__), 'distutils.cfg'
        )
    if kind == 'user':
        dot = os.name == 'posix' and '.' or ''
        return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot))
    raise ValueError(
        "config_file() type must be 'local', 'global', or 'user'", kind
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号