Thread: Strange problem

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    0
    Rep Power
    0

    Question


    Why does this work in the "Python Shell" but when I execute it in a script it doesn't work?

    day = time.strftime('%d', time.gmtime(time.time()))

    When I execute this in a script i get this error:

    Traceback(most recent call last):
    File "Myfile.py"
    day = time.strftime('%d', time.gmtime(time.time()))
    AttributeError: strftime

    Seems a bit unlogical for me. Can someone help me?
  2. #2
  3. No Profile Picture
    PerlGuy
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2001
    Posts
    720
    Rep Power
    42

    Wink


    It appears that you have to many close-parentheses at the end of the line. If that's just a typo in you post then nevermind, but you may want to check on that.
    - dsb -
    Perl Guy
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    0
    Rep Power
    0
    Problem already solved. Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo