Lines Matching refs:path

60 def _jython_aware_splitext(path):
61 if path.lower().endswith('$py.class'):
62 return path[:-9]
63 return os.path.splitext(path)[0]
199 # static methods follow a different path
278 top_level_dir = os.path.abspath(top_level_dir)
280 if not top_level_dir in sys.path:
283 # in sys.path to minimise likelihood of conflicts between installed
285 sys.path.insert(0, top_level_dir)
289 if os.path.isdir(os.path.abspath(start_dir)):
290 start_dir = os.path.abspath(start_dir)
292 is_not_importable = not os.path.isfile(os.path.join(start_dir, '__init__.py'))
303 start_dir = os.path.abspath(
304 os.path.dirname((the_module.__file__)))
317 sys.path.remove(top_level_dir)
327 full_path = os.path.abspath(module.__file__)
329 if os.path.basename(full_path).lower().startswith('__init__.py'):
330 return os.path.dirname(os.path.dirname(full_path))
335 return os.path.dirname(full_path)
337 def _get_name_from_path(self, path):
338 if path == self._top_level_dir:
340 path = _jython_aware_splitext(os.path.normpath(path))
342 _relpath = os.path.relpath(path, self._top_level_dir)
343 assert not os.path.isabs(_relpath), "Path must be within the project"
346 name = _relpath.replace(os.path.sep, '.')
353 def _match_path(self, path, full_path, pattern):
355 return fnmatch(path, pattern)
375 for path in paths:
376 full_path = os.path.join(start_dir, path)
397 basename = os.path.basename(full_path)
398 if os.path.isfile(full_path):
416 mod_file = os.path.abspath(
419 os.path.realpath(mod_file))
421 os.path.realpath(full_path))
423 module_dir = os.path.dirname(realpath)
425 os.path.basename(full_path))
426 expected_dir = os.path.dirname(full_path)
432 elif os.path.isdir(full_path):
433 if not os.path.isfile(os.path.join(full_path, '__init__.py')):