Skip to content

Instantly share code, notes, and snippets.

View DrKabum's full-sized avatar

Nicolas Broca DrKabum

View GitHub Profile
@DrKabum
DrKabum / append-to-sys.path-regadless-of-working-directory.py
Last active June 27, 2023 06:00
This is a reliable import command when getting libs out of your python script's folder
import sys, os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), "RELATIVE/PATH/TO/LIB/FOLDER")))
# you can now import from this file
from file_in_lib_folder import blabla