if the given path is a directory ERROR the path is a directory
(src: Path)
| 24 | your/path/file.txt |
| 25 | ''' |
| 26 | def readFile(src: Path): |
| 27 | |
| 28 | ''' |
| 29 | if the given path is a directory |
| 30 | ERROR the path is a directory |
| 31 | ''' |
| 32 | if src.is_dir(): |
| 33 | |
| 34 | logger.error(f'The path {src}: is a directory') |
| 35 | |
| 36 | else: |
| 37 | |
| 38 | with open(src, 'r') as f: |
| 39 | for lines in f: |
| 40 | print(lines, end='') |
| 41 | |
| 42 | def cli() -> argparse.Namespace: |
| 43 | parser = argparse.ArgumentParser( |