Last active
December 30, 2024 09:31
-
-
Save day253/bbabceca8c8b077b5033eab209f84e5e to your computer and use it in GitHub Desktop.
__vsc_ipynb_file__
This file contains hidden or 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 IPython | |
| import os | |
| notebook_file_path = IPython.extract_module_locals()[1]["__vsc_ipynb_file__"] | |
| print(notebook_file_path) | |
| dir_path = os.path.dirname(notebook_file_path) | |
| print(dir_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment