# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/ipython/path.ipynb.

# %% auto 0
__all__ = ['get_curr_nb_path_vscode']

# %% ../../nbs/ipython/path.ipynb 2
from typing import Optional
from pathlib import Path

# %% ../../nbs/ipython/path.ipynb 5
def get_curr_nb_path_vscode() -> Optional[Path]:
    from IPython import get_ipython
    ip = get_ipython()
    path = None
    if '__vsc_ipynb_file__' in ip.user_ns:
        path = ip.user_ns['__vsc_ipynb_file__']
        return Path(path)
    return path
