Skip to content

Instantly share code, notes, and snippets.

@wiccy46
Created May 27, 2021 12:51
Show Gist options
  • Save wiccy46/fe134b6f64be6bd4e9cb9d5594fab753 to your computer and use it in GitHub Desktop.
Save wiccy46/fe134b6f64be6bd4e9cb9d5594fab753 to your computer and use it in GitHub Desktop.
[python_path] Path magics for python #python
# Add ./.. of the file to python path
sys.path.insert(0, os.path.normpath(os.path.join(os.path.realpath(__file__), '..', '..')))
# Current path
base = os.path.dirname(os.path.realpath(__file__))
# File abs path
cos.path.realpath(__file__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment