Return a string with the textual contents of a file at PATH.
(path)
| 198 | |
| 199 | |
| 200 | def _get_text(path): |
| 201 | """Return a string with the textual contents of a file at PATH.""" |
| 202 | fp = open(path, 'r') |
| 203 | try: |
| 204 | return fp.read() |
| 205 | finally: |
| 206 | fp.close() |
| 207 | |
| 208 | |
| 209 | def _handle_dir(path): |