[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] ideas for saving points in games



i found information on it but now I'm getting a TypeError

if event.key == K_s:
                out_file = open('test.txt', 'w')
                objRect = rect()
                pickle.dump (objRect, out_file)

On 9/24/07, David <dvkeeney@xxxxxxxxx> wrote:
 
Pickle is one of Python's serializing modules.
 
http://docs.python.org/lib/module-pickle.html
 
It can save and restore data, code, classes, etc...
 
David
 
 
On 9/24/07, Eric Hunter <hunter.eric1@xxxxxxxxx > wrote:
yeah. that's what I was thinking using a .txt file. what's pickle?


On 9/24/07, Ian Mallett <geometrian@xxxxxxxxx > wrote:
On 9/23/07, Aaron Maupin < maupin@xxxxxxxxxxxxxx > wrote:
> Eric Hunter wrote:
> You could just pickle the list.  That's essentially what I used for
pickle?
I've always used .txt files.




--
dkeeney@xxxxxxxxxxxxxxxx
Pitcher's Duel -> pitchersduel.python-hosting.com