Last active
March 25, 2021 14:08
-
-
Save thoroc/42a490ab76d18740236e6863bade9243 to your computer and use it in GitHub Desktop.
show how to open nautilus (linux file explorer) from a Jupyter Notebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
output_path = Path('output') | |
list_files = [f.name for f in output_path.iterdir() if f.is_file() and f.suffix == f'.csv'] | |
for f in list_files: | |
if my_file in f: | |
print(f'found the file: {f}') | |
dir_path = Path(Path.cwd(), output_path) | |
subprocess.call(['nautilus', dir_path]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment