RE: Deleting line at the end of a file

2003-03-06 Thread Adam Getchell
ost version 2 when it's better > -Original Message- > From: Jeff Shannon [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 10:42 AM > To: [EMAIL PROTECTED] > Cc: Adam Getchell > Subject: Re: Deleting line at the end of a file > > > Adam Getchell wrote: >

Deleting line at the end of a file

2003-03-05 Thread Adam Getchell
you in recipients: me = "Webnanny" msg['Subject'] = 'Sites link check %s' % runtime msg['From'] = me msg['To']= you server = smtplib.SMTP('hrrm.ucdavis.edu') server.set_debuglevel(1) #server.connect() server.sendmail(me

RE: Calculating Squid Hits per IP address

2003-02-05 Thread Adam Getchell
Jeff spotted it. Here's the corrected script, which now parses the data: def CalculateSquidIpHits(logfile_pathname): # Make a dictionary to store IP addresses and their hit counts # and read the contents of the log file line by line IpHitListing = {} Contents = open(logfile_pathna

Calculating Squid Hits per IP address

2003-01-30 Thread Adam Getchell
CalculateSquidIpHits [Logfile]" if __name__ == '__main__': main() *** * Adam Getchell [EMAIL PROTECTED] * System Architect/Programmer (530) 752-1584 * Human Resources Information Systems http://www.hr.ucdavis.edu/

Shell tool

2002-05-12 Thread Adam Getchell
lse: return ("File should not be deleted") def purge(file): if prune(file) == "T": os.remove(file) if __name__ == '__main__': os.path.walk(sys.argv[1], lister, None) --Adam Getchell ___ Act

Shell tool

2002-05-12 Thread Adam Getchell
"T":     os.remove(file)          if __name__ == '__main__':     os.path.walk(sys.argv[1], lister, None)   --Adam Getchell