From a python program, I want to delete certain files that are older than x days old.
To get the time that the file was last modified, it looks like I need to use os.path.getmtime(path). This gives you the time represented in the number of seconds from the epoch. I'd like to convert this into a datetime object, but I can't seem to figure out how. Once it's a datetime object, I can do simple (datetime.datetime.today() - filedatetime).days to figure out the days old. How do you convert a time represented in seconds from the epoch into a datetime object? Mike _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor