Created
March 30, 2022 16:43
-
-
Save neelratanguria/e841b5474fcb83410ea663f934563a27 to your computer and use it in GitHub Desktop.
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
def append_parent_path(): | |
import sys | |
import os | |
# getting the name of the directory | |
# where the this file is present. | |
current = os.path.dirname(os.path.realpath(__file__)) | |
# Getting the parent directory name | |
# where the current directory is present. | |
parent = os.path.dirname(current) | |
# adding the parent directory to | |
# the sys.path. | |
sys.path.append(parent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment