[Tutor] Program to report if file was modified today
Kent Johnson
kent37 at tds.net
Thu Feb 12 03:23:53 CET 2009
On Wed, Feb 11, 2009 at 8:46 PM, bob gailer <bgailer at gmail.com> wrote:
> 5) It is not necessary to convert times to strings. You can get midnight
> today from int(time.localtime())
??
In [1]: import time
In [2]: time.localtime()
Out[2]: time.struct_time(tm_year=2009, tm_mon=2, tm_mday=11,
tm_hour=21, tm_min=20, tm_sec=11, tm_wday=2, tm_yday=42, tm_isdst=0)
In [4]: int(time.localtime())
TypeError: int() argument must be a string or a number, not 'time.struct_time'
Kent
More information about the Tutor
mailing list