13 lines
302 B
Python
Executable File
13 lines
302 B
Python
Executable File
#!/usr/bin/env python
|
|
# Exercise 12a
|
|
# ls command
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("paths", default=Path().cwd(), nargs="*", type=Path)
|
|
parser.add_argument("-r", "--recursive", action="store_true")
|
|
args = parser.parse_args()
|
|
result = ""
|