I missed an important line of code. Here it is: >>> aaa = 'telltale' Once you have that, these will work: >>> eval('aaa', fn.__globals__) 'telltale' >>> __name__ '__main__' >>> import sys >>> getattr(sys.modules[__name__], 'aaa') 'telltale' -- Jonathan