os.path.getmtime() and compare with a date type

2007-09-20 Thread junchi . tang
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(f

Re: os.path.getmtime() and compare with a date type

2007-09-20 Thread Junchi Tang
Thanks, that works perfectly! On 9/20/07, Anthony Greene <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > 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 wit