I have three python files file1.py
, file2.py
, file3.py
. Each file will generate a .csv
file and will give it to the other file sequentially. To elaborate file1.py
will generate file1.csv
and this .csv
file will be the input of file2.py
and so on.
import file1
import file2
import file3
file1
file2
file3
IOError: File file2.csv does not exist
The problem is when I import file2.py
,there is no file1.csv
as it is yet to be executed. Please let me how to call each one sequentially without even reading the next python file.