---------- Forwarded message ---------- From: "diliup gabadamudalige" <dili...@gmail.com> Date: Aug 29, 2014 8:34 PM Subject: Re: [Tutor] extracting a cPickle/pickle file from inside a zip file To: "Danny Yoo" <d...@hashcollision.org> Cc:
Dear Danny, Thank for your invaluable advice which is much appreciated. My code finally ends up being exe-fied with py2exe and I have a bit of a limitation there. I have to select packages which are compatible with it. Haven't tried json or checked whether it is compatible but I will do so. On another note which is a better exe-fier? py2exe or cxfreeze? I would like your personal opinion if you have any knowledge on this matter. Thank you once again for your invaluable help. Diliupg On Sat, Aug 30, 2014 at 3:24 AM, Danny Yoo <d...@hashcollision.org> wrote: > Hi Dillup, > > One other comment other than the zipfile stuff: you might want to > consider something other than pickle format if you want > interchangeability with other tools. JSON, for example, is pretty > well-supported in the json library: > > https://docs.python.org/2/library/json.html > > and it has an interface similar to that of pickle, so it's easy to switch > to it. > > I recommend this instead of pickle, unless your situation favors > pickle. JSON has a looser coupling to Python, and more importantly, > fewer security concerns. Pickle can do some very dynamic stuff, > including eval-like behavior, which can be a worry. See: > http://stackoverflow.com/questions/10282175/attacking-pythons-pickle > for example. > > If you're trying to represent dictionaries of string keys and values, > that's something that JSON can handle very well. > -- Diliup Gabadamudalige http://www.diliupg.com http://soft.diliupg.com/ ********************************************************************************************** This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. **********************************************************************************************
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor