def set_windows_env_variables(config): import winpaths config.set('DEFAULT', 'common_app_data_folder', winpaths.get_common_appdata()) config.set('DEFAULT', 'win_local_appdata', winpaths.get_local_appdata()) config.set('DEFAULT', 'win_appdata', winpaths.get_appdata()) config.set('DEFAULT', 'win_desktop', winpaths.get_desktop()) config.set('DEFAULT', 'win_programs', winpaths.get_programs()) config.set('DEFAULT', 'win_common_admin_tools', winpaths.get_common_admin_tools()) config.set('DEFAULT', 'win_common_documents', winpaths.get_common_documents()) config.set('DEFAULT', 'win_cookies', winpaths.get_cookies()) config.set('DEFAULT', 'win_history', winpaths.get_history()) config.set('DEFAULT', 'win_internet_cache', winpaths.get_internet_cache()) config.set('DEFAULT', 'win_my_pictures', winpaths.get_my_pictures()) config.set('DEFAULT', 'win_personal', winpaths.get_personal()) config.set('DEFAULT', 'win_my_documents', winpaths.get_my_documents()) config.set('DEFAULT', 'win_program_files', winpaths.get_program_files()) config.set('DEFAULT', 'win_program_files_common', winpaths.get_program_files_common()) config.set('DEFAULT', 'win_system', winpaths.get_system()) config.set('DEFAULT', 'win_windows', winpaths.get_windows()) config.set('DEFAULT', 'win_startup', winpaths.get_startup()) config.set('DEFAULT', 'win_recent', winpaths.get_recent())
def get_applications_path(): """Return the directory where applications are commonly installed on the system.""" plat = platform.system() if plat == 'Windows': import winpaths return winpaths.get_program_files() elif plat == 'Darwin': return '/Applications'
Typical Usage: See TestDetectInstalledSites.py Todo: replace hardcoded site list with something more subtle """ import platform import os import Configuration if platform.system() == 'Windows': import winpaths PROGRAM_FILES = winpaths.get_program_files() LOCAL_APPDATA = winpaths.get_local_appdata() class DetectInstalledSites(): def __init__(self, sitename = "All"): self.Config=Configuration.Config() # # objects returned # self.sitestatusdict = {} self.sitename = sitename self.heroname = "" self.hhpath = "" self.detected = ""
def get_applications_path(): """Return the directory where applications are commonly installed on the system.""" if is_windows: return winpaths.get_program_files() elif is_mac: return "/Applications"
Typical Usage: See TestDetectInstalledSites.py Todo: replace hardcoded site list with something more subtle """ import platform import os import Configuration Config = Configuration.Config() if Config.os_family in ['Win7', 'XP']: import winpaths PROGRAM_FILES = winpaths.get_program_files() LOCAL_APPDATA = winpaths.get_local_appdata() class DetectInstalledSites(): def __init__(self, sitename="All"): # # objects returned # self.sitestatusdict = {} self.sitename = sitename self.heroname = "" self.hhpath = "" self.detected = "" # #since each site has to be hand-coded in this module, there
def get_applications_path(): """ """ if is_windows: return winpaths.get_program_files() elif is_mac: return "/Applications"