Re: Simple account program

2005-03-24 Thread Kent Johnson
Igorati wrote: ah thank you again. Anyone know of a good place to get information about TK inter. I am gonna try and make this program somewhat of a GUI. Thank you again. http://docs.python.org/lib/module-Tkinter.html http://www.pythonware.com/library/tkinter/introduction/index.htm http://infohost.

Re: Simple account program

2005-03-24 Thread Igorati
ah thank you again. Anyone know of a good place to get information about TK inter. I am gonna try and make this program somewhat of a GUI. Thank you again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple account program

2005-03-21 Thread Chris Rebert (cybercobra)
You probably want: import pickle pickle.dump(myAccount, file("account.pickle", "w")) To reload your account: import pickle myAccount = pickle.load(file("account.pickle")) -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple account program

2005-03-21 Thread Greg Ewing
Igorati wrote: pickle.dump ((withdrawl), file ('account.pickle', 'w')) ^ Is this banking done with an American accent? :-) pickle.dump ((deposit), file ('account.pickle', 'w')) Am I on the right track? The file you create in the second statement is going to overwrite the fir

Re: Simple account program

2005-03-21 Thread Igorati
Question then, do I do an import pickle pickle.dump ((withdrawl), file ('account.pickle', 'w')) pickle.dump ((deposit), file ('account.pickle', 'w')) Am I on the right track? -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple account program

2005-03-20 Thread Igorati
I was looking at both the programs and I got Dennis Lee Bieber's code to work, then I tried the imporvements from Chris Reberts code but was unable to get it to run. It said EOL error. I took out got and tried to move it around but it didn't take. I took the else code at the end so that other keys

Re: Simple account program

2005-03-18 Thread Chris Rebert (cybercobra)
Since everyone's improving the program, I thought I'd just tweak Dennis Lee Bieber's code a little. Here's the result. Good luck Ignorati! import time class Transaction(object): def __init__(self, payee, amount, date=None): # amount is the amt withdrawn/deposited self.payee =

Re: Simple account program

2005-03-18 Thread M.E.Farmer
Igorati wrote: > Thank you all for your help. I am sorry that I am struggling with > programming. I still am attempting to "get it". Yes, I do need to stop > posting homework assignments, perhaps I will learn to write code through > more studying. I have gone through some toutorials if that makes y

Re: Simple account program

2005-03-18 Thread Igorati
Thank you all for your help. I am sorry that I am struggling with programming. I still am attempting to "get it". Yes, I do need to stop posting homework assignments, perhaps I will learn to write code through more studying. I have gone through some toutorials if that makes you feel any better. I d

Re: Simple account program

2005-03-18 Thread Peter Maas
wes weston schrieb: >Why have transactions not associated with accounts? > All transactions are related to an account; have > a self.TransActList in Account. >You have "amount" in both Withdrawl and Deposit > both derived from Transaction. If Transactions always > have an amount, why not pu

Re: Simple account program

2005-03-17 Thread wes weston
Igorati wrote: Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file

Re: Simple account program

2005-03-17 Thread Ron
The indentation got messed up a bit, it should look like this. class Transaction: def __init__(self): self.name = '' self.amount = 0.0 self.type = '' class Account: def __init__(self, name=''): self.name = name self.ledger = [] def newtransaction(self

Re: Simple account program

2005-03-17 Thread Ron
Igorati wrote: Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file

Re: Simple account program

2005-03-17 Thread M.E.Farmer
Igorati, I wished I could give you a simple fix, BUT... You need to really re-read the docs and do some tutors first . Your understanding of classes and namespaces is flawed and will not become clear without futher study. search strategy: python namespaces python class python tutor Classes are li

Simple account program

2005-03-17 Thread Igorati
Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file only for the d