(self, name=None, must_exist=False, is_dir=False)
| 455 | return data |
| 456 | |
| 457 | def _potential_locations(self, name=None, must_exist=False, is_dir=False): |
| 458 | # Will give an iterator over the full path of potential locations |
| 459 | # according to the search path. |
| 460 | for path in self.search_paths: |
| 461 | if os.path.isdir(path): |
| 462 | full_path = path |
| 463 | if name is not None: |
| 464 | full_path = os.path.join(path, name) |
| 465 | if not must_exist: |
| 466 | yield full_path |
| 467 | else: |
| 468 | if is_dir and os.path.isdir(full_path): |
| 469 | yield full_path |
| 470 | elif os.path.exists(full_path): |
| 471 | yield full_path |
| 472 | |
| 473 | def is_builtin_path(self, path): |
| 474 | """Whether a given path is within the package's data directory. |
no test coverage detected