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
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.
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
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.
July 18th, 2004, 03:11 PM
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?
July 19th, 2004, 02:25 AM
Here you go...
A slightly modified example from the time module documentation:
If you need different formatting then please refer to the docs.
print time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
July 19th, 2004, 05:43 AM
Thank you!! I can't wait to try it out!!!