The system path inside the environment

        :return: The :data:`sys.path` from the environment
        :rtype: list
491278
def sys_path(self):
        

        from .vendor.vistir.compat import JSONDecodeError
        current_executable = vistir.compat.Path(sys.executable).as_posix()
        if not self.python or self.python == current_executable:
            return sys.path
        elif any([sys.prefix == self.prefix, not self.is_venv]):
            return sys.path
        cmd_args = [self.python, "-c", "import json, sys; print(json.dumps(sys.path))"]
        path, _ = vistir.misc.run(cmd_args, return_object=False, nospin=True, block=True, combine_stderr=False, write_to_stdout=False)
        try:
            path = json.loads(path.strip())
        except JSONDecodeError:
            path = sys.path
        return path
200133
def get_python_path() -> str:
    
    python_bin = None
    if os.name == 'nt':
        python_root = os.path.abspath(
            os.path.join(os.__file__, os.pardir, os.pardir))
        python_bin = os.path.join(python_root, 'python.exe')
    else:
        python_root = os.path.abspath(
            os.path.join(os.__file__, os.pardir, os.pardir, os.pardir))
        python = os.__file__.rsplit('/')[-2]
        python_bin = os.path.join(python_root, 'bin', python)
    return python_bin
1189715
def realpath(path):
    
    if path == '~':
        return userdir

    if path == '/':
        return sysroot

    if path.startswith('/'):
        return os.path.abspath(path)

    if path.startswith('~/'):
        return os.path.expanduser(path)

    if path.startswith('./'):
        return os.path.abspath(os.path.join(os.path.curdir, path[2:]))

    return os.path.abspath(path)
1218932
def relpath(self):
        
        here = os.path.abspath(os.path.curdir)
        relpath = os.path.relpath(self.fpath, here)
        return relpath
38268
def system_config_dir():
    
    """
    if LINUX or SUNOS:
        path = '/etc'
    elif BSD or MACOS:
        path = '/usr/local/etc'
    else:
        path = os.environ.get('APPDATA')
    if path is None:
        path = ''
    else:
        path = os.path.join(path, 'glances')

    return path
406301
def _get_path():
    """"""
    if _path:
        return _path[0]
    environ_paths = set(os.environ['PATH'].split(':'))
    environ_paths.add('/usr/local/bin')
    environ_paths.add('/usr/bin')
    _path.append(':'.join(environ_paths))
    logger.debug('PATH = %s', _path[-1])
    return _path[0]
1293027
def get_path_directories():
    
    pth = os.environ['PATH']
    if sys.platform == 'win32' and os.environ.get("BASH"):
        # winbash has a bug..
        if pth[1] == ';':  # pragma: nocover
            pth = pth.replace(';', ':', 1)
    return [p.strip() for p in pth.split(os.pathsep) if p.strip()]
525038
def path(self):
        
        return "/projects/%s/managedZones/%s/changes/%s" % (
            self.zone.project,
            self.zone.name,
            self.name,
        )
172502
def sysidpath(ignore_options=False):
    
    # in the event we have to make our own
    # this should not be passed in a as a parameter
    # since we need these definitions to be more or less static
    failover = Path('/tmp/machine-id')

    if not ignore_options:
        options = (
            Path('/etc/machine-id'),
            failover,  # always read to see if we somehow managed to persist this
        )
        for option in options:
            if (option.exists() and
                os.access(option, os.R_OK) and
                option.stat().st_size > 0):
                    return option

    uuid = uuid4()
    with open(failover, 'wt') as f:
        f.write(uuid.hex)

    return failover
542877
def filepaths(self):
        
        return nativestring(self._filepathEdit.text()).split(os.path.pathsep)
1018045
def path(self, path):
        
        if os.path.isabs(path):
            return path
        return os.path.join(self.location, path)
110106
def get_install_paths(name):
    
    paths = {}

    i = get_install_command(name)

    for key in install.SCHEME_KEYS:
        paths[key] = getattr(i, 'install_' + key)

    # pip uses a similar path as an alternative to the system's (read-only)
    # include directory:
    if hasattr(sys, 'real_prefix'):  # virtualenv
        paths['headers'] = os.path.join(sys.prefix,
                                        'include',
                                        'site',
                                        'python' + sys.version[:3],
                                        name)

    return paths
442846
def get_path_name(self):
        
        path = fix_raw_path(os.path.dirname(os.path.abspath(self.path)))
        name = os.path.basename(self.path)
        return path, name
960549
def data_path(self) -> DataPath:
        """"""
        dp = self.data_parent()
        return (dp.data_path() if dp else "") + "/" + self.iname()
981205
def relpath(self, path):
        
        return os.path.relpath(path, start=self.path)
773824
def path(self):
        """"""
        self._path = ''
        path_args = self.path_args
        path = "/{}".format("/".join(path_args))
        return path
515702
def add_sys_paths(paths):
    
    original_syspath = sys.path[:]
    sys.path.extend(paths)

    try:
        yield
    finally:
        sys.path = original_syspath