Re: marshal.loads ValueError

2007-01-31 Thread abcd
On Jan 31, 8:02 am, Benjamin Niemann <[EMAIL PROTECTED]> wrote: > marshal is used to (de)serialize python objects from/to strings. > marshal.loads() tries to deserialize an encoded string back into a python > object - which does not make sense here. > What you probably want is: > > exec data in my_

Re: marshal.loads ValueError

2007-01-31 Thread Benjamin Niemann
Hello, abcd wrote: > I have the following code which is sent over the wire as a string... > > from time import time > class Foo: > def go(self): > print "Time:", time() > > > I get this code and store it as, "data" > > data = receivePythonSource() > > Then I try... > > exec mars

marshal.loads ValueError

2007-01-31 Thread abcd
I have the following code which is sent over the wire as a string... from time import time class Foo: def go(self): print "Time:", time() I get this code and store it as, "data" data = receivePythonSource() Then I try... exec marshal.loads(data) in my_module.__dict__ However I ge