Given a path entry from sys.path which may refer to an importer, return the appropriate FilePath-like instance. @param pathName: a str describing the path. @return: a FilePath-like object.
(self, pathName)
| 657 | return rval |
| 658 | |
| 659 | def _smartPath(self, pathName): |
| 660 | """ |
| 661 | Given a path entry from sys.path which may refer to an importer, |
| 662 | return the appropriate FilePath-like instance. |
| 663 | |
| 664 | @param pathName: a str describing the path. |
| 665 | |
| 666 | @return: a FilePath-like object. |
| 667 | """ |
| 668 | importr = self.importerCache.get(pathName, _nothing) |
| 669 | if importr is _nothing: |
| 670 | for hook in self.sysPathHooks: |
| 671 | try: |
| 672 | importr = hook(pathName) |
| 673 | except ImportError: |
| 674 | pass |
| 675 | if importr is _nothing: # still |
| 676 | importr = None |
| 677 | return IPathImportMapper(importr, _theDefaultMapper).mapPath(pathName) |
| 678 | |
| 679 | def iterEntries(self): |
| 680 | """ |
no test coverage detected