Conditions | 3 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # View directories and files in a window |
||
8 | def open_window(path): |
||
9 | """Open path in finder or explorer window""" |
||
10 | if 'pathlib' in modules: |
||
11 | try: |
||
12 | call(["open", "-R", str(Path(str(path)))]) |
||
13 | except FileNotFoundError: |
||
14 | Popen(r'explorer /select,' + str(Path(str(path)))) |
||
15 | else: |
||
16 | print('pathlib module must be installed to execute open_window function') |
||
17 | |||
25 |