Hi,
I am new to python and are tryint to write a simple program delete log
files that are older than 30 days.

So I used os.path.getmtime(filepath) and compare it with a date but it
does not compile.

threshold_time = datetime.date.today() - datetime.timedelta(days=30)
mod_time = os.path.getmtime(file_path)

if( mod_time < threshold_time):
         #delete file

However the interpreter complains at the if line, say "can't comapre
datetime.date to int

How can I covert one of them to make it work?

Thank you!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to