Returns VMware preferences file path.

        :returns: path to the preferences file
774365
def get_vmware_preferences_path():
        

        if sys.platform.startswith("win"):
            return os.path.expandvars(r"%APPDATA%\VMware\preferences.ini")
        elif sys.platform.startswith("darwin"):
            return os.path.expanduser("~/Library/Preferences/VMware Fusion/preferences")
        else:
            return os.path.expanduser("~/.vmware/preferences")
1215717
def get_path():
    '''
    
    '''
    ret = salt.utils.stringutils.to_unicode(
        __utils__['reg.read_value'](
            'HKEY_LOCAL_MACHINE',
            'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
            'PATH')['vdata']
    ).split(';')

    # Trim ending backslash
    return list(map(_normalize_dir, ret))
390825
def module_path():
    

    if we_are_frozen():
        return os.path.dirname(
                unicode(sys.executable, sys.getfilesystemencoding()))

    return os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
1111314
def read_preferences_file(self):
        
        user_data_dir = find_pmag_dir.find_user_data_dir("thellier_gui")
        if not user_data_dir:
            return {}
        if os.path.exists(user_data_dir):
            pref_file = os.path.join(user_data_dir, "thellier_gui_preferences.json")
            if os.path.exists(pref_file):
                with open(pref_file, "r") as pfile:
                    return json.load(pfile)
        return {}
1237698
def get_user_config_file():
    
    user_home = os.getenv('XDG_CONFIG_HOME')
    if user_home is None or not user_home:
        config_path = os.path.expanduser(os.path.join('~', '.config',
                                                      's-tui', 's-tui.conf'))
    else:
        config_path = os.path.join(user_home, 's-tui', 's-tui.conf')

    return config_path
596894
def find_config_file():
    
    local_config_name = path(CONFIG_FILE_NAME)
    if os.path.isfile(local_config_name):
        return local_config_name
    else:
        user_config_name = path(CONFIG_FILE_NAME, root=USER)
        if os.path.isfile(user_config_name):
            return user_config_name
        else:
            return None
864743
def infile_path(self) -> Optional[PurePath]:
        
        if not self.__infile_path:
            return Path(self.__infile_path).expanduser()
        return None
73805
def get_config_load_path(conf_path=None):
    

    if conf_path is None:
        # test ./andes.conf
        if os.path.isfile('andes.conf'):
            conf_path = 'andes.conf'
        # test ~/andes.conf
        home_dir = os.path.expanduser('~')
        if os.path.isfile(os.path.join(home_dir, '.andes', 'andes.conf')):
            conf_path = os.path.join(home_dir, '.andes', 'andes.conf')

    if conf_path is not None:
        logger.debug('Found config file at {}.'.format(conf_path))

    return conf_path
155175
def GetSyncMoConfigFilePath():
		
		return os.path.join(os.path.join(os.path.dirname(__file__), "resources"), "SyncMoConfig.xml")
98917
def _getPath():
        
        
        if os.name == "posix":
            path = os.getenv("HOME") + "/.config/google-chrome/Default/Cookies"
            return path
        
        import _winreg
        key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders')
        path = _winreg.QueryValueEx(key, 'Local AppData')[0]
        path = os.path.join(path, 'Google\\Chrome\\User Data\\Default\\Cookies')
        
        return path
1036596
def find_vmrun(self):
        

        # look for vmrun
        vmrun_path = self.config.get_section_config("VMware").get("vmrun_path")
        if not vmrun_path:
            if sys.platform.startswith("win"):
                vmrun_path = shutil.which("vmrun")
                if vmrun_path is None:
                    # look for vmrun.exe using the VMware Workstation directory listed in the registry
                    vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation")
                    if vmrun_path is None:
                        # look for vmrun.exe using the VIX directory listed in the registry
                        vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX")
            elif sys.platform.startswith("darwin"):
                vmrun_path = "/Applications/VMware Fusion.app/Contents/Library/vmrun"
            else:
                vmrun_path = "vmrun"

        if vmrun_path and not os.path.isabs(vmrun_path):
            vmrun_path = shutil.which(vmrun_path)

        if not vmrun_path:
            raise VMwareError("Could not find VMware vmrun, please make sure it is installed")
        if not os.path.isfile(vmrun_path):
            raise VMwareError("vmrun {} is not accessible".format(vmrun_path))
        if not os.access(vmrun_path, os.X_OK):
            raise VMwareError("vmrun is not executable")
        if os.path.basename(vmrun_path).lower() not in ["vmrun", "vmrun.exe"]:
            raise VMwareError("Invalid vmrun executable name {}".format(os.path.basename(vmrun_path)))

        self._vmrun_path = vmrun_path
        return vmrun_path
749849
def get_buildfile_path(settings):
    
    base = os.path.basename(settings.build_url)
    return os.path.join(BUILDS_ROOT, base)
789262
private static Path getConfigFilePath(Path projectPath) {
        String pathString = SystemProperty.CONFIGURATION_FILE.value();
        Path path;
        if (pathString == null) {
            path = DEFAULT_CONFIG_FILE;
        } else {
            path = Paths.get(pathString);
        }
        return projectPath.resolve(path);
    }
488510
def _get_config_dir():
    
    if 'SAWTOOTH_HOME' in os.environ:
        return os.path.join(os.environ['SAWTOOTH_HOME'], 'etc')

    if os.name == 'nt':
        base_dir = \
            os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
        return os.path.join(base_dir, 'conf')

    return '/etc/sawtooth'
886247
def _nvram_file(self):
        
        return os.path.join(self.working_dir, "nvram_{:05d}".format(self.application_id))
785661
def file_path(self) -> str:
        
        user_dir = self.__get_user_path()
        file_path = path.abspath(path.join(user_dir, self.FILENAME))
        return file_path
460848
def get_default_filepath(cls):
        """"""
        if not cls.config_files:
            return None
        if not cls.config_searchpath:
            return None
        filename = cls.config_files[0]
        filepath = cls.config_searchpath[0]
        return os.path.join(filepath, filename)