Python argparse.py() Examples

The following are code examples for showing how to use argparse.py(). They are extracted from open source Python projects. You can vote up the examples you like or vote down the exmaples you don't like. You can also save this page to your account.

Example 1
Project: coquery   Author: gkunter   File: options.py    (license) View Source Project 5 votes vote down vote up
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