I am trying to reference a variable from one python file to another.
I have a base file that has a variable value, current_time and I want to call this variable in another python function that is in another python file.
This is what I tried doing:
From the file I am trying to call the variable:
ref_path = os.path.split(os.getcwd())[0]
ref_path = os.path.join(ref_path, "folder_1", "folder_2", "folder_3")
Now that I am pointing to the destination folder when I try doing
from ref_path import function as function
I am getting an error ModuleNotFoundError: No module named 'ref_path'
I am trying to call function.current_time