| Store | Cart

Simple account program

From: Greg Ewing <g...@cosc.canterbury.ac.nz>
Tue, 22 Mar 2005 15:28:45 +1200
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 first one. If you want to append
data to an existing file, you need to open it in
'a' mode.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg

Recent Messages in this Thread
Igorati Mar 17, 2005 05:25 pm
M.E.Farmer Mar 17, 2005 09:12 pm
Ron Mar 17, 2005 09:42 pm
Ron Mar 17, 2005 09:54 pm
wes weston Mar 17, 2005 10:12 pm
Peter Maas Mar 18, 2005 01:54 pm
Igorati Mar 18, 2005 05:26 pm
M.E.Farmer Mar 18, 2005 09:56 pm
cvre...@gmail.com ) (Chris Rebert (cybercobra) Mar 19, 2005 07:20 am
Igorati Mar 20, 2005 03:20 pm
Igorati Mar 22, 2005 01:10 am
Greg Ewing Mar 22, 2005 03:28 am
cvre...@gmail.com ) (Chris Rebert (cybercobra) Mar 22, 2005 06:38 am
Igorati Mar 24, 2005 09:05 am
Kent Johnson Mar 24, 2005 01:49 pm
Messages in this thread

Previous post: C pointers/Python
Next post: C pointers/Python