I have multiple .py files in my directory which are all imported by main.py. All generate a variable that points to the class, but as I create new ones I need to include them as parameters to be used by that instance. Is there a better way to do this?
Here are the relevant pieces of code:
import environment, display, airspace, userinput
then:
ENV = environment.Environment(sys.argv)
ATC = airspace.Airspace(ENV=ENV)
DISP = display.Display(ENV=ENV, ATC=ATC)
USER = userinput.UserInput(ENV=ENV, ATC=ATC, DISP=DISP)
In other words, is there a way to avoid having to do ENV=ENV, ATC=ATC, DISP=DISP?