Log rolling question

elake ericlake at gmail.com
Tue Oct 25 18:56:27 CEST 2005

I have an application that creates a lot of large log files. I only
want to keep logs for the previous 4 months. I am looking for a way to
list the contents of the log dir and if the create date on the log is
older than 4 months delete it. I have looked at the os.stat() function
to get the created date but I can't figure out how to get the date to
go back to a previos time.

Any help would be appreciated.

More information about the Python-list mailing list