Lines Matching full:path
53 def _normalize_path(path):
54 """Normalize path.
57 path: the path to normalize.
59 Path is converted to the absolute path.
60 The input path can use either '\\' or '/' as the separator.
61 The normalized path always uses '/' regardless of the platform.
64 path = path.replace('\\', os.path.sep)
65 path = os.path.realpath(path)
66 path = path.replace('\\', '/')
67 return path
74 def converter(path):
75 if not path.endswith(_SOURCE_SUFFIX):
77 path = _normalize_path(path)
78 if not path.startswith(base_dir):
80 return path[base_len:-suffix_len]
89 path = os.path.join(root, base)
90 if _SOURCE_PATH_PATTERN.search(path):
91 yield path
139 if not os.path.realpath(scan_dir).startswith(
140 os.path.realpath(root_dir)):
147 """Add resource path alias.
153 alias_resource_path: alias resource path
154 existing_resource_path: existing resource path
218 The resource path is determined relative to root_dir.
222 for path in _source_file_paths(scan_dir):
224 handlers = _source(open(path).read())
226 self._source_warnings.append('%s: %s' % (path, e))
228 self._handlers[to_resource(path)] = handlers