> While this is technically legal, you should restrain yourself from doing > such a thing, unless you *really* know what you're doing and why. > >> but the variable is not getting updated in the module >> containing global symbols ( variables). > > I suspect you didn't use a qualified name when importing. You have to do it > this way : > > # myglobals.py: > answer = 42 > > # question.py > import myglobals > myglobals.answer = "WTF ?" >
But if I do :- #question.py from myglobals import * myglobals.answer = "WTF ?" will this work? -- http://mail.python.org/mailman/listinfo/python-list