Created
May 28, 2023 09:06
-
-
Save fuwiak/0e4ec33e00be0a076e971c5fc4212a7e to your computer and use it in GitHub Desktop.
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 os | |
import sys | |
# Pobierz aktualną ścieżkę do bieżącego pliku | |
current_path = os.path.dirname(os.path.abspath(__file__)) | |
# Dodaj dwa poziomy wyżej do ścieżki | |
two_levels_up = os.path.abspath(os.path.join(current_path, "../../")) | |
# Dodaj nową ścieżkę do sys.path, aby Python mógł znaleźć moduł | |
sys.path.append(two_levels_up) | |
# Zaimportuj moduł | |
import modul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment