February 22, 2022    Share on: Twitter | Facebook | HackerNews | Reddit

Python Add Parent Directory To Path

Adding parent path with the modules to import is sometimes useful in jupyter notebooks.

# Add parent directory to path
import sys; sys.path.insert(0, '..')

See also my GitHub gist.