Using something from on another page on this site, I've managed to create global variables that are accessible across modules by doing something along the lines of--
Mod1.py--
def init():
global testVar
mod2.py--
import mod1
mod1.init()
print(mod1.testVar)
How, though, in mod2.py, can I dynamically access global variables in mod1? Something like--
nameOfVarThatIWant = 'testVar'
print(mod1.globals()[nameOfVarThatIWant])