equal
deleted
inserted
replaced
7 import os |
7 import os |
8 |
8 |
9 ap = argparse.ArgumentParser() |
9 ap = argparse.ArgumentParser() |
10 ap.add_argument('path', nargs='+') |
10 ap.add_argument('path', nargs='+') |
11 opts = ap.parse_args() |
11 opts = ap.parse_args() |
|
12 |
12 |
13 |
13 def gather(): |
14 def gather(): |
14 for p in opts.path: |
15 for p in opts.path: |
15 if not os.path.exists(p): |
16 if not os.path.exists(p): |
16 return |
17 return |
22 for f in files: |
23 for f in files: |
23 yield os.path.join(dirpath, f) |
24 yield os.path.join(dirpath, f) |
24 else: |
25 else: |
25 yield p |
26 yield p |
26 |
27 |
|
28 |
27 print('\n'.join(sorted(gather(), key=lambda x: x.replace(os.path.sep, '/')))) |
29 print('\n'.join(sorted(gather(), key=lambda x: x.replace(os.path.sep, '/')))) |