| 431 | # Used by `linecache` (while printing tracebacks) unless module filename |
| 432 | # exists on the filesystem. |
| 433 | def get_source(self, fullname): |
| 434 | fullname = self._source_name.get(fullname) or fullname |
| 435 | if self.is_package(fullname): |
| 436 | fullname += '.__init__' |
| 437 | |
| 438 | relpath = self.get_filename(fullname) |
| 439 | if relpath: |
| 440 | abspath = resfs_resolve(relpath) |
| 441 | if abspath: |
| 442 | return _s(file_bytes(abspath)) |
| 443 | data = resfs_read(mod_path(fullname)) |
| 444 | return _s(data) if data else '' |
| 445 | |
| 446 | def get_code(self, fullname): |
| 447 | modname = fullname |