I have a file fileA.py where my students input some data and fill in a certain portion of the code. There are a few functions they call from a module, fileB.py inside the file fileA.py. When they are calling functions, I do not want them to pass data as arguments , since that would confuse them a lot (they are 9th grade students). So, I want to make the data of fileA.py available to fileB.py. I cannot use
from __fileA__ import *
because, that will be a recursive call. I have already used it in fileA.py. So, I need a way out of this, where I can use variable defined in fileA.py to be used by fileB.py. I had an idea of creating a bypass.py such that
fileA calls functions from fileB.
Functions in fileB call functions from bypass.py
bypass.py accesses fileA.py and returns to fileB.py.
So, the recursion is kind of avoided.
from __fileA__ import *
because, that will be a recursive call. I have already used it in fileA.py. So, I need a way out of this, where I can use variable defined in fileA.py to be used by fileB.py. I had an idea of creating a bypass.py such that
fileA calls functions from fileB.
Functions in fileB call functions from bypass.py
bypass.py accesses fileA.py and returns to fileB.py.
So, the recursion is kind of avoided.
Comment