Just like ``get_option`` but return a ``pathlib.Path`` object of
        the string.
550261
def get_option_path(self, name, section=None, vars=None, expect=None):
        
        val = self.get_option(name, section, vars, expect)
        return Path(val)
270677
def get_path(self, path):
        
        mapping = self.get_path_mapping(path)
        return self.path_class(api=self, path=path, mapping=mapping)
432382
def get(cls, option, default_value=None):
        
        config = cls.__get_instance()
        for name in option.split(':'):
            if not name:
                raise Exception('Incorrect value in path (maybe double `:` or empty path)')
            if name not in config:
                return default_value
            config = config[name]
        return deepcopy(config)
480330
def get_path(url):
    

    url = urlsplit(url)
    path = url.path
    if url.query:
        path += "?{}".format(url.query)
    return path
1168935
def which(x):
    '''
    
    '''
    for p in os.environ.get('PATH').split(os.pathsep):
        p = os.path.join(p, x)
        if os.path.exists(p):
            return os.path.abspath(p)
    return None
1172626
def _GetRelPath(self, filename):
		""""""
		assert filename.startswith(self.subdir), (filename, self.subdir)
		return filename[len(self.subdir):].lstrip(r"\/")
1222603
def _option(value):
    '''
    
    '''
    if value in __opts__:
        return __opts__[value]
    master_opts = __pillar__.get('master', {})
    if value in master_opts:
        return master_opts[value]
    if value in __pillar__:
        return __pillar__[value]
573157
def get_by_path(path, _globals=None):
    
    if _globals is None:
        _globals = list()
    return _get_by_path(path.split('.'), _globals)
1087212
def _resolve_path(obj, path=None):
        
        if path:
            for attr_name in path.split('__'):
                obj = getattr(obj, attr_name)
        return obj
99930
def get_by_dotted_path(d, path, default=None):
    
    if not path:
        return d
    split_path = path.split('.')
    current_option = d
    for p in split_path:
        if p not in current_option:
            return default
        current_option = current_option[p]
    return current_option
1193383
def path_for(self, *args):
        """"""
        if args and args[0].startswith(os.path.sep):
            return os.path.join(*args)
        return os.path.join(self._root_path or os.getcwd(), *args)
379181
def get(self, value, cfg=None):
        
        if value is None and cfg:
            if self.option_type == 'list':
                value = cfg.get_list(self.name, None)
            else:
                value = cfg.get(self.name, None)

        if value is None:
            value = self.default
        else:
            parse_method = getattr(self, 'parse_%s' % (self.option_type), None)
            if parse_method:
                value = parse_method(value)
        return value
884035
def existing_path(string):
    ''''''
    if not os.path.exists(string):
        msg = 'path {0!r} does not exist'.format(string)
        raise argparse.ArgumentTypeError(msg)
    return string
451638
def get_path(self):
        ''''''
        model, tree_iter = self.selection.get_selected()
        if not tree_iter:
            return '/'
        else:
            return model[tree_iter][PATH_COL]
371592
def get_path(self, prefix=None, filename=None):
        """"""
        prefix = prefix or settings.FLOW_EXECUTOR['DATA_DIR']

        path = os.path.join(prefix, self.subpath)
        if filename:
            path = os.path.join(path, filename)

        return path
892463
def relpath(self, path, start=None):
        """"""
        if not path:
            raise ValueError("no path specified")
        path = make_string_path(path)
        if start is not None:
            start = make_string_path(start)
        else:
            start = self.filesystem.cwd
        if self.filesystem.alternative_path_separator is not None:
            path = path.replace(self.filesystem.alternative_path_separator,
                                self._os_path.sep)
            start = start.replace(self.filesystem.alternative_path_separator,
                                  self._os_path.sep)
        path = path.replace(self.filesystem.path_separator, self._os_path.sep)
        start = start.replace(
            self.filesystem.path_separator, self._os_path.sep)
        path = self._os_path.relpath(path, start)
        return path.replace(self._os_path.sep, self.filesystem.path_separator)
1237464
def getobjpath(obj, path):
    
    if not path:
        return obj
    if path.startswith("["):
        item = path[1:path.index("]")]
        return getobjpath(obj[item], path[len(item) + 2:])
    if path.startswith("."):
        path = path[1:]
    if "." in path or "[" in path:
        dot_idx = path.find(".")
        bracket_idx = path.find("[")
        if dot_idx == -1 or bracket_idx < dot_idx:
            idx = bracket_idx
            next_idx = idx
        else:
            idx = dot_idx
            next_idx = idx + 1
        attr = path[:idx]
        return getobjpath(getattr(obj, attr), path[next_idx:])
    return getattr(obj, path)