INNER CODE UNIT · Python

install_directory

AUNaseef/protonup · protonup/api.py:65

def install_directory(target=None) -> str:

    """
    Custom install directory
    Return Type: str
    """
    config = ConfigParser()

    if target and target.lower() != 'get':
        if target.lower() == 'default':
            target = DEFAULT_INSTALL_DIR
        if not target.endswith('/'):
            target += '/'
        if not config.has_section('protonup'):
            config.add_section('protonup')
        config['protonup']['installdir'] = target
        os.makedirs(os.path.dirname(CONFIG_FILE), exist_ok=True)
        with open(CONFIG_FILE, 'w') as file:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…