I try to pass the two strings Start='2018-07-01'and End='2019-07-01' from one script mainfile.py to another script plot.py.
Here, these dates are used for giving titles to the plots.
mainfile.py:
from choose_weatherstation import Choose_Weatherstation
# from summary import scatter_size
#choose_weatherstation is the function: Input has to be
'Weatherstation',perhour(true/false), weather(false/true)
save(True/false),statistic (true/False)
Start='2018-09-01'
End='2018-12-31'
Choose_Weatherstation('Zeeland',Start,End,True,True,True,True)
plot.py
import matplotlib.pyplot as plt
import seaborn as sns
from mainfile import Start, End
Start=mainfile.Start
End=mainfile.End
def three_plot(condition,plot1,plot2,plot3,filename,Save=False):
...(Not of interest here)
From what I read in other threads, I tried to import these two variables with the following:
from mainfile import Start, End
However, as I do this, the following error occurs cannot import name 'Choose_Weatherstation' from 'choose_weatherstation' (L:\Improved Code\venv\choose_weatherstation.py)
This refers to the first line of script mainfile.py, where I import Choose_Weatherstation from choose_weatherstation.py.
When I do NOT try to import Start and End, no errors are found.
Can anyone explain me what I am doing wrong here?