Last active
June 27, 2023 06:00
-
-
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
This file contains 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
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