import PAM
import time
from win32com.client import Dispatch #this is needed to open an Excel file
execfile('c:\\Python24\\scripts\\PAM.py')
f = open('c:\python24\scripts\urls.txt','r') #opens list of urls to be tested
xlApp = Dispatch("Excel.Application")
xlApp.Visible = 0
xlApp.Workbooks.Add()
Row = 1
for x in f: #run this for every url in txt file.
ie = IE_Invoke(x)
starttime = time.clock() #get timestamp at IE startup
wait(ie) #wait for IE to completetly load page
stoptime = time.clock() #get timestamp at IE completion
elapsed = stoptime-starttime #calculate the runtime
ie.QUIT()
xlApp.ActiveSheet.Cells(Row,1).Value = x
xlApp.ActiveWorkbook.ActiveSheet.Cells(Row,2).Value = elapsed
Row = Row+1
xlApp.ActiveWorkbook.ActiveSheet.SaveAs('c:\\test_results\dave.xls') #save results to excel book
xlApp.Quit()
-- http://mail.python.org/mailman/listinfo/python-list