Gross, Dorit (SDRN) wrote: > [snip] > for f in fileList: > try: > globvars = {'infile' : f} > locvars = {} > execfile('/scripts/second.py', globvars(), locvars) > except IOError: > exit(0) > print locvars > > > And this is what happens when calling test_exec.py > > ./test_exec.py > Traceback (most recent call last): > File "./test_exec.py", line 19, in ? > execfile('/scripts/second.py', vars(), results) > TypeError: 'dict' object is not callable >
Why do you try to call globevars as if it was a function? As the traceback states, dictionaries can't be called like that. Just take the () out and try again. -smithj -- http://mail.python.org/mailman/listinfo/python-list