Re: [IronPython] Question about serialization

2008-03-27 Thread Paul Turbett
Thanks for the suggestion, unfortunately, again, no dice. It seems there is no way to serialize an IP object that derives from a .NET base class. Even though the base class is marked as serializable, I still get an error about the derived class not being marked as serializable when I use the fe

Re: [IronPython] Question about serialization

2008-03-26 Thread Sanghyeon Seo
2008/3/26, Paul Turbett <[EMAIL PROTECTED]>: > It seems that whilst serializing .NET classes is trivial, and serializing > python classes is trivial, serializing something that touches both is > proving quite difficult. > > Any further suggestions gratefully received! I suggest using copy_reg to

Re: [IronPython] Question about serialization

2008-03-26 Thread Curt Hagenlocher
global. > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Curt Hagenlocher > *Sent:* Wednesday, March 26, 2008 8:31 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Question about serialization > > > > This is an inter

Re: [IronPython] Question about serialization

2008-03-26 Thread Dino Viehland
load and see what you got - much like how cPickle does an import and uses what it gets when it's loading a global. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher Sent: Wednesday, March 26, 2008 8:31 AM To: Discussion of IronPython Subject: Re: [IronPython

Re: [IronPython] Question about serialization

2008-03-26 Thread Curt Hagenlocher
se its priority and we'd be more likely to do it > sooner rather than later. > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Paul Turbett > *Sent:* Wednesday, March 26, 2008 4:56 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPy

Re: [IronPython] Question about serialization

2008-03-26 Thread Dino Viehland
o: Discussion of IronPython Subject: Re: [IronPython] Question about serialization Thanks Michael for the advice. Must appreciated. Unfortunately I hasn't worked out yet tho :( I can use pickle from C# using Evaluate, or from within a Python class, on a "pure" Python object. Ho

Re: [IronPython] Question about serialization

2008-03-26 Thread Curt Hagenlocher
This is an interesting problem. Python's pickle writes out enough data to rebuild the object entirely -- including the class definition, if the object is a user-defined type. How do you accurately write out a class definition for a C# base class? Would you restrict it to strongly named classes?

Re: [IronPython] Question about serialization

2008-03-26 Thread Paul Turbett
Thanks Michael for the advice. Must appreciated. Unfortunately I hasn't worked out yet tho :( I can use pickle from C# using Evaluate, or from within a Python class, on a "pure" Python object. However any attempt at pickling a python object that derives from a C# base result in an exception li

Re: [IronPython] Question about serialization

2008-03-25 Thread Michael Foord
Paul Turbett wrote: > Hi, > > I'm using IP as a scripting engine in a C# app. I have various Python > classes that derive from a C# base class, and have there own additional > data & functionality. > > I would like to be able to serialize instances of the Python classes > from the C# host for pe