Re: problem doing unpickle in an exec statement

2008-07-24 Thread Peter Otten
Danny Shevitz wrote: > Howdy, > > In my app I need to exec user text that defines a function. I want this > function to unpickle an object. Pickle breaks because it is looking for > the object definition that isn't in the calling namespace. > > I have mocked up a simple example that shows the pr

Re: problem doing unpickle in an exec statement

2008-07-23 Thread castironpi
On Jul 23, 6:01 pm, Danny Shevitz <[EMAIL PROTECTED]> wrote: > Howdy, > > In my app I need to exec user text that defines a function. I want this > function to unpickle an object. Pickle breaks because it is looking for > the object definition that isn't in the calling namespace. > > I have mocked

problem doing unpickle in an exec statement

2008-07-23 Thread Danny Shevitz
Howdy, In my app I need to exec user text that defines a function. I want this function to unpickle an object. Pickle breaks because it is looking for the object definition that isn't in the calling namespace. I have mocked up a simple example that shows the problem. Run this first code (from