RE: RE: Advise of programming one of my first programs

2012-03-29 Thread Prasad, Ramit
From: Anatoli Hristov [mailto:toli...@gmail.com] Sent: Wednesday, March 28, 2012 5:36 PM To: Prasad, Ramit Cc: python-list@python.org Subject: Re: RE: Advise of programming one of my first programs >>> > Um, at least by my understanding, the use of Pickle is also dangerous if >&g

Re: RE: Advise of programming one of my first programs

2012-03-28 Thread Chris Angelico
Thu, Mar 29, 2012 at 9:36 AM, Anatoli Hristov wrote: >> > > Um, at least by my understanding, the use of Pickle is also dangerous >> > > if you are not completely sure what is being passed in: >> > >> > Oh goodness yes. pickle is exactly as unsafe as eval is. Try running >> > this code: >> > >> >

Re: RE: Advise of programming one of my first programs

2012-03-28 Thread Anatoli Hristov
> > Um, at least by my understanding, the use of Pickle is also dangerous if > > you > > > are not completely sure what is being passed in: > > > > Oh goodness yes. pickle is exactly as unsafe as eval is. Try running this > > code: > > > > from pickle import loads > > loads("c__builtin__\neval\n(c_

RE: RE: Advise of programming one of my first programs

2012-03-28 Thread Prasad, Ramit
> >> The use of eval is dangerous if you are not *completely* sure what is > >> being passed in. Try using pickle instead: > >> http://docs.python.org/release/2.5.2/lib/pickle-example.html > > > > > > Um, at least by my understanding, the use of Pickle is also dangerous if > you > > are not complet

Re: RE: Advise of programming one of my first programs

2012-03-27 Thread Devin Jeanpierre
On Tue, Mar 27, 2012 at 5:59 PM, Evan Driscoll wrote: >> The use of eval is dangerous if you are not *completely* sure what is >> being passed in. Try using pickle instead: >> http://docs.python.org/release/2.5.2/lib/pickle-example.html > > > Um, at least by my understanding, the use of Pickle is

Re: RE: Advise of programming one of my first programs

2012-03-27 Thread Evan Driscoll
On 01/-10/-28163 01:59 PM, Prasad, Ramit wrote: ### CODE # fileread = open('myfile.txt','r') tbook = eval(fileread.read()) fileread.close() The use of eval is dangerous if you are not *completely* sure what is being passed in. Try using pickle instead: http://docs.python.org/release