thanks. i had actually coded this almost exactly
the same. i'll try to make my
questions more specific. i am able to pickle and
restore world. which is a dictionary
of coordinates : room objects. when i look at the
savefile that pickle generates i can
see all my descriptions and exits. however when i
reload my world gets back all
the rooms that were created with dig. but the rooms
don't have their exits or descriptions.
is pickle the right tool for this? can i
pickle.dump more than one thing to the same
savefile? or how could i go about creating a
structure that holds room, coords, descriptions
and exits? and then pickle and unpickle that.
or would it be better to write my own functions to
write everything to a file and not use
pickle at all? eventually my program will have many
more things to keep track of and
i am thinking that the saving and restoring of a
programs state (is that correct usage?)
could be important in many different
programs.
|
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor