str: comparable representation of the path specification.
775897
def comparable(self):
    """"""
    string_parts = []

    string_parts.append('table name: {0:s}'.format(self.table_name))
    string_parts.append('column name: {0:s}'.format(self.column_name))

    if self.row_condition is not None:
      row_condition_string = ' '.join([
          '{0!s}'.format(value) for value in self.row_condition])
      string_parts.append('row condition: "{0:s}"'.format(
          row_condition_string))

    if self.row_index is not None:
      string_parts.append('row index: {0:d}'.format(self.row_index))

    return self._GetComparable(sub_comparable_string=', '.join(string_parts))
712527
def match_path( ypath_str )
            depth = 0
            matches = []
            YPath.each_path( ypath_str ) do |ypath|
                seg = match_segment( ypath, 0 )
                matches += seg if seg
            end
            matches.uniq
        end
1167688
def path_list(self, sep=os.pathsep):
        '''  '''
        from pathlib import Path
        return [ Path(pathstr) for pathstr in self.split(sep) ]
1310132
def translate_paths (properties, path):
    
    assert is_iterable_typed(properties, Property)
    result = []

    for p in properties:

        if p.feature.path:
            values = __re_two_ampersands.split(p.value)

            new_value = "&&".join(os.path.normpath(os.path.join(path, v)) for v in values)

            if new_value != p.value:
                result.append(Property(p.feature, new_value, p.condition))
            else:
                result.append(p)

        else:
            result.append (p)

    return result
476017
def ParseCategorizedPath(path):
  """"""
  components = tuple(component for component in path.split("/") if component)
  if components[0:2] == ("fs", "os"):
    return PathInfo.PathType.OS, components[2:]
  elif components[0:2] == ("fs", "tsk"):
    return PathInfo.PathType.TSK, components[2:]
  elif components[0:1] == ("registry",):
    return PathInfo.PathType.REGISTRY, components[1:]
  elif components[0:1] == ("temp",):
    return PathInfo.PathType.TEMP, components[1:]
  else:
    raise ValueError("Incorrect path: '%s'" % path)
824283
def _path_factory(check):
    """"""

    @functools.wraps(check)
    def validator(paths):
        if isinstance(paths, str):
            check(paths)
        elif isinstance(paths, collections.Sequence):
            for path in paths:
                check(path)
        else:
            raise Exception('expected either basestr or sequenc of basstr')

    return validator
990553
def compare(left: Union[str, pathlib.Path, _Entity],
            right: Union[str, pathlib.Path, _Entity]) -> Comparison:
    

    def normalise(param: Union[str, pathlib.Path, _Entity]) -> _Entity:
        """
        Turns any one of a number of types of input into an entity.

        :param param: The input - either a path string, a path object, or a
                      full blown entity.
        :return: The input param as an entity.
        """
        if isinstance(param, str):
            param = pathlib.Path(param)
        if isinstance(param, pathlib.Path):
            param = _Entity.from_path(param)
        return param

    return Comparison.compare(normalise(left), normalise(right))
63458
def ToPath(self):
    """"""

    if self.path_type == PathInfo.PathType.OS:
      return os.path.join("fs", "os", *self.path_components)
    elif self.path_type == PathInfo.PathType.TSK:
      return os.path.join("fs", "tsk", *self.path_components)
    elif self.path_type == PathInfo.PathType.REGISTRY:
      return os.path.join("registry", *self.path_components)
    elif self.path_type == PathInfo.PathType.TEMP:
      return os.path.join("temp", *self.path_components)

    raise ValueError("Unsupported path type: %s" % self.path_type)
265515
private static Collection<String> findPaths(Path path)
    {
        List<String> paths = findPaths(path, false);
        Collections.sort(paths);
        return paths;
    }
825615
def paths(self):
        """"""
        if not self.select_paths:
            return sys.path
        result = []
        match_any = set()
        for path in sys.path:
            path = os.path.normcase(os.path.abspath(path))
            for match in self.select_paths:
                match = os.path.normcase(os.path.abspath(match))
                if '*' in match:
                    if re.search(fnmatch.translate(match+'*'), path):
                        result.append(path)
                        match_any.add(match)
                        break
                else:
                    if path.startswith(match):
                        result.append(path)
                        match_any.add(match)
                        break
            else:
                logger.debug("Skipping path %s because it doesn't match %s"
                             % (path, ', '.join(self.select_paths)))
        for match in self.select_paths:
            if match not in match_any and '*' not in match:
                result.append(match)
                logger.debug("Adding path %s because it doesn't match anything already on sys.path"
                             % match)
        return result
1137092
def normalize_paths(value, parent=os.curdir):
    
    if not value:
        return []
    if isinstance(value, list):
        return value
    paths = []
    for path in value.split(','):
        path = path.strip()
        if '/' in path:
            path = os.path.abspath(os.path.join(parent, path))
        paths.append(path.rstrip('/'))
    return paths
1002093
def get_comparable_values(self):
        
        return (str(self.name), str(self.description), str(self.constraints))
1257128
def _represent_match_traversal(match_traversal):
    """"""
    output = []

    output.append(_first_step_to_match(match_traversal[0]))
    for step in match_traversal[1:]:
        output.append(_subsequent_step_to_match(step))

    return u''.join(output)
1172945
def get_comparable_values(self):
        
        return (not self.generic, str(self.name), str(self.description))
392904
def get_comparable_values(self):
        
        return (str(self.name), str(self.description), str(self.type), bool(self.optional), str(self.constraints) if isinstance(self, Constraintable) else "")
1111789
def ellipse2pathd(ellipse):
    """"""

    cx = ellipse.get('cx', 0)
    cy = ellipse.get('cy', 0)
    rx = ellipse.get('rx', None)
    ry = ellipse.get('ry', None)
    r = ellipse.get('r', None)

    if r is not None:
        rx = ry = float(r)
    else:
        rx = float(rx)
        ry = float(ry)

    cx = float(cx)
    cy = float(cy)

    d = ''
    d += 'M' + str(cx - rx) + ',' + str(cy)
    d += 'a' + str(rx) + ',' + str(ry) + ' 0 1,0 ' + str(2 * rx) + ',0'
    d += 'a' + str(rx) + ',' + str(ry) + ' 0 1,0 ' + str(-2 * rx) + ',0'

    return d
509204
def relpath(path):
    """"""
    return os.path.normpath(
        os.path.join(os.path.abspath(os.path.dirname(__file__)), path)
    )