[EMAIL PROTECTED]:~ $ python
Use now() from datetime class of datetime module instead of time
module.
Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
py> import datetime
py> t = datetime
Hello,
I want to know if a certain duration is over.
I try it like this with timedelta objects:
d = datetime.timedelta(minutes = 2)
t = time.gmtime()
print (t + d < time.gmtime())
gives:
TypeError: unsupported operand type(s) for +: 'datetime.timedelta' and
'time.struct_time'
How to do that rig