コード例 #1
0
ファイル: packaging.py プロジェクト: TurpIF/KHome
def is_installed(module_name, directory=None):
    """
    Return if the named module exists in the given directory (defaults to
    module installation directory).
    """
    module_directory = path.module_directory(module_name, directory)
    config_file = path.config_file(module_name, module_directory)
    return os.path.isdir(module_directory) and os.path.exists(config_file)
コード例 #2
0
ファイル: packaging.py プロジェクト: jmcomets/KHome
def is_installed(module_name, directory=None):
    """
    Return if the named module exists in the given directory (defaults to
    module installation directory).
    """
    module_directory = path.module_directory(module_name, directory)
    config_file = path.config_file(module_name, module_directory)
    return os.path.isdir(module_directory) and os.path.exists(config_file)
コード例 #3
0
ファイル: packaging.py プロジェクト: TurpIF/KHome
def get_config(module_name, directory=None):
    """
    Load the configuration for the named module, passing in the 'directory'
    argument with the same use as for get_config_file().
    """
    return load_config(path.config_file(module_name, directory))
コード例 #4
0
ファイル: packaging.py プロジェクト: jmcomets/KHome
def get_config(module_name, directory=None):
    """
    Load the configuration for the named module, passing in the 'directory'
    argument with the same use as for get_config_file().
    """
    return load_config(path.config_file(module_name, directory))