[Tutor] FW: Module 1 question

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Thu Jun 17 13:34:28 EDT 2004



On Wed, 16 Jun 2004, christopher lavezza wrote:

> Can anyone help us out with this problem in our script?

Hi Christopher,


Let's take a closer look at the error.


> >Traceback (most recent call last):
> >   File "Script5_1.py", line 23, in ?
> >     a.deposit(550.23)
> >   File "Script5_1.py", line 8, in deposit
> >     t=time.strtime('%a, %d %b %Y %H:%M:%S' , time.localtime(time.time()
> >+ 0))
> >AttributeError: 'module' object has no attribute 'strtime'

Ok, it sounds like you're trying to use a function called 'strtime' in the
'time' module:

    http://www.python.org/doc/lib/module-time.html

Unfortunately, there is no such function named 'strtime'. The author
probably mistyped 'strftime', which translates a time value to a nicely
formatted string.


Hope this helps!




More information about the Tutor mailing list