I believe I have some fundamental misunderstanding of Python global variables and their scope, and I was hoping someone can educate me. Say I have two Python files.
#"GlobalSet.py"
global myVar
myVar = True
print "myVar" in globals()
import GlobalCheck
and
#"GlobalCheck.py"
print "myVar" in globals()
Running "GlobalSet.py" surprisingly results in
True
False
Why isn't "myVar" in the global scope within "GlobalCheck"?