Re: Compare 2 times
- From: Alain Ketterlin <alain@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 06 Jun 2012 15:29:37 +0200
loial <jldunn2000@xxxxxxxxx> writes:
I have a requirement to test the creation time of a file with the
current time and raise a message if the file is more than 15 minutes
old.
Platform is Unix.
I have looked at using os.path.getctime for the file creation time and
time.time() for the current time, but is this the best approach?
No. getctime() returns the last "change" time. The creation time is not
kept anywhere. This may still match your requirement though. And os.path
is the right package to look at for such tasks.
-- Alain.
.
- Follow-Ups:
- Re: Compare 2 times
- From: Alain Ketterlin
- Re: Compare 2 times
- References:
- Compare 2 times
- From: loial
- Compare 2 times
- Prev by Date: ttk.Spinbox missing?
- Next by Date: Re: Compare 2 times
- Previous by thread: Compare 2 times
- Next by thread: Re: Compare 2 times
- Index(es):
Relevant Pages
|