Re: Convert obejct string repr to actual object

2007-10-15 Thread English, Mark
X-Replace-Address: [EMAIL PROTECTED] On 12 Oct, 18:14, Carsten Haese [EMAIL PROTECTED] wrote: On Fri, 2007-10-12 at 17:41 +0100, English, Mark wrote: From: Tor Erik Sønvisen Date: October 8th 2007 I've tried locating some code that can recreate an object from it's string

Re: Convert obejct string repr to actual object

2007-10-12 Thread English, Mark
From: Tor Erik Sønvisen Date: October 8th 2007 I've tried locating some code that can recreate an object from it's string representation... On a related note I've wondered about this: class Foo(object): pass f = Foo() s = repr(f) s '__main__.Foo object at 0x007CBAB0' So how do I get f

Re: Convert obejct string repr to actual object

2007-10-12 Thread Carsten Haese
On Fri, 2007-10-12 at 17:41 +0100, English, Mark wrote: From: Tor Erik Sønvisen Date: October 8th 2007 I've tried locating some code that can recreate an object from it's string representation... On a related note I've wondered about this: class Foo(object): pass f = Foo() s =

Convert obejct string repr to actual object

2007-10-08 Thread Tor Erik Sønvisen
Hi, I've tried locating some code that can recreate an object from it's string representation... The object in question is really a dictionary containing other dictionaries, lists, unicode strings, floats, ints, None, and booleans. I don't want to use eval, since I can't trust the source sending

Re: Convert obejct string repr to actual object

2007-10-08 Thread Carsten Haese
On Mon, 2007-10-08 at 21:19 +0200, Tor Erik Sønvisen wrote: Hi, I've tried locating some code that can recreate an object from it's string representation... The object in question is really a dictionary containing other dictionaries, lists, unicode strings, floats, ints, None, and

Re: Convert obejct string repr to actual object

2007-10-08 Thread Chris Mellon
On 10/8/07, Tor Erik Sønvisen [EMAIL PROTECTED] wrote: Hi, I've tried locating some code that can recreate an object from it's string representation... The object in question is really a dictionary containing other dictionaries, lists, unicode strings, floats, ints, None, and booleans. I

Re: Convert obejct string repr to actual object

2007-10-08 Thread Diez B. Roggisch
Tor Erik Sønvisen schrieb: Hi, I've tried locating some code that can recreate an object from it's string representation... The object in question is really a dictionary containing other dictionaries, lists, unicode strings, floats, ints, None, and booleans. I don't want to use eval,

Re: Convert obejct string repr to actual object

2007-10-08 Thread Steven D'Aprano
On Mon, 08 Oct 2007 21:19:50 +0200, Tor Erik Sønvisen wrote: I don't want to use eval, since I can't trust the source sending the object I'm sure someone must have had the same need and created code for it... Maybe Pypy has what I need??? Haven't looked though... For the benefit of those

Re: Convert obejct string repr to actual object

2007-10-08 Thread Michael Spencer
Tor Erik Sønvisen wrote: Hi, I've tried locating some code that can recreate an object from it's string representation... The object in question is really a dictionary containing other dictionaries, lists, unicode strings, floats, ints, None, and booleans. I don't want to use eval,