Looks like you pretty well figured it out. for the timestamp there is the basic timemodule, the datetime module or the extra module mxdatetime. Each more sophisticated than the last...
Alan G ----- Original Message ----- From: "Adisegna" <[EMAIL PROTECTED]> To: <tutor@python.org> Sent: Thursday, November 17, 2005 4:13 AM Subject: Re: [Tutor] Passing HTTP commands through Telnet using Python forweb site testing? So far this is what I have come up with doing some research. import urllib for line in urllib.urlopen('http://mywebsit.com/folder/folder/test.asp'): if '400 Bad Request' in line: text_file = open("mysite.log", "a") text_file.writelines(line) text_file.writelines("\n") text_file.close() This writes the to a new line each time the script is run. Now I have to figure out an "if then else" to write the other possible error codes and appending a timestamp followed by a space each time it runs. Thanks _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor