Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DrKabum/60043f2a4cbb951c450bf9b77db99c4c to your computer and use it in GitHub Desktop.
Save DrKabum/60043f2a4cbb951c450bf9b77db99c4c to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment