Python argparse 模块,py() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用argparse.py()

项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def get_configuration_type():
    """
    Return the type of the current configuration.

    Returns
    -------
    s : str or None
        Depending on the type of the currenct configuration, `s` equals
        either the constant SQL_MYSQL or SQL_SQLITE from defines.py. If
        no configuration is available, return None.
    """
    if cfg.current_server in cfg.server_configuration:
        return cfg.server_configuration[cfg.current_server]["type"]
    else:
        return None