I have a folder called Script
and inside I have temp.py
script. My temp script imports module from sub-folder called lib
.
Lib folder has inside empty __init__.py
and my parent_computer_test.py
script.
in my temp.py
script is the following code:
import lib.parent_computer_test as parent_computer_test
parent_computer_test.mainChunk()
parent_computer_test.splitChunks()
I managed to import module from sub-folder without any bigger problems.
This workflow/script works fine, BUT for a specific reason, my lib
folder has to be somewhere else on my computer. There is a long story why, but it has to be that way.
Long story short. I want that my temp.py
from the /Script
folder imports modules from folder lib
(or any other name) with parent_computer_test.py
, but at the same time this folder is no sub-folder of /Script
- so it is somewhere else in the computer. It can be C:/development/...
or something.
So my question is how to import a module from a specific folder?