Hi, The problem is in the second line.
a = time.daylight() The daylight is not a method in time module. It is clear here, http://docs.python.org/2/library/time.html Since it is not a method we cannot call it. It is just a integer variable . It returns zero if DST timezone is not defined and returns non zero if defined. >>> import time >>> a = time.daylight() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'int' object is not callable >>> a = time.daylight >>> a 0 >>> type(time.daylight) <type 'int'> Regards, Krishnan On Tue, Aug 27, 2013 at 8:15 AM, <autobotprime...@gmail.com> wrote: > dear friends when i try to execute following lines > > import time > a = time.daylight() > print(a) > > > result is > TypeError: 'int' object is not callable > > > why is this error and how can i solve this problem? > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list