Alternatives for pickle?
Jeff Shannon
jeff at ccvcorp.com
Mon Oct 11 21:41:41 EDT 2004
Antoon Pardon wrote:
>I also thought about writing out a string that, when read
>back in and fed to eval would recreate the structure. But
>that seems to be just as insecure if not more so.
>
>
As I understand it, this is *exactly* what pickle already does.
>So how do you serialize data in python, when you want
>a somewhat secure mechanisme. Preferably where a user
>can make a puzzle file by hand in a text editor.
>
>
I'd agree with the earlier comment -- define your own file format, and
write code to parse that format and instantiate the necessary objects.
If it's hard to define something that's both effective for your
purposes, and hard to hand-code in a text editor, then consider writing
a puzzle-editor app that will allow GUI creation of puzzles which can be
saved in your custom file format.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list