It is hard to find a title for this question and hopefully this thread is not a duplicate.
I was writing that long script in Python 2.7 (using PyCharm 2016.2.2) for a project and decided to split it in different .py files which I could then import into a main file.
Unfortunately, it seems that when importing a module (e.g. numpy) earlier in the code does not mean that the .py files that are imported below will have knowledge of that.
I am new to python and I was wondering whether there is an easy workaround for that one.
To be more clear, here is an example structure of my code:
Main.py (the file that is used to run the script):
raw_input = pandas.read_excel('April.xls', index_col = 'DateTime')
numpy module imported in
basic.py has a reference defined only withing
basic.py scope. You have to explictly import
numpy everywhere you use it.
import basic.py import numpy numpy.random.seed(7) import load_data.py