help in execfile function

moijes12 moijes12 at gmail.com
Thu Sep 4 08:03:57 EDT 2008


Hi

i have 3 python files and i want to execute the files sequentially
using the execfile command.Hence ,i have written the following program


fileList = ["a.py","b.py","c.py"]

for fileName in fileList  :
    execfile(fileName)

however,when i try running it,the program keeps calling execfile on
a.py and thus an infinite loop is created.I am running this on Windows
XP.

Please suggest a sloution whereby i can use execfile to execute all
files in fileList.Please tell me where in my program i may have gone
wrong.

moijes12



More information about the Python-list mailing list