#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0

    How do I get this class account to run?


    Hi! I try to run the attached program in my Python GUI and the end result is nothing. I mean it runs but all I see is the cursur afterwards. I don't get any errors either. Am I missing something here? Do I need to add something? I know my GUI is working because I have run other code on it.
    I have zero programming experience in case it isn't obvious. LOL

    Thanks ya'll!
    Attached Files
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    The last 4 lines have a space at the begining of them. Remove the spaces and it should work. If you had run the program it would have generated a syntax error.
    Grim
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0
    Thanks Frim Archon. I took out the space and still got the same three prompts. Then I played with the indention and did get errors. Do I need to define something or is it already done in this code? I thought it was. If I sound confused....its because I am! LOL
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    I copied the code from the doc your posted.

    Taking the space out from the front of the last three lines allowed the program to run and print the result in IDLE.

    Nothing else is needed and there is nothing tricky in the code.

    grim
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0
    Got it Grim. Thanks bunches. I have it running now. I guess indention is super important in python. If you have time can you show me how do I get it to show me the date when I do a transaction?
  10. #6
  11. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Here you go...

    A slightly modified example from the time module documentation:
    Code:
    import time
    print time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
    If you need different formatting then please refer to the docs.

    grim
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0

    Talking Thank You!!!


    Thank you!! I can't wait to try it out!!!

IMN logo majestic logo threadwatch logo seochat tools logo