I\'m working on a relatively large Python application, and there are several resources that I would like to keep as global variables accessible throughout several different
Doing so requires violating PEP8, which specifies
Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.
In order for gui.py to successfully import __main__.DEBUG, you would have to set the value of DEBUG before import gui.