[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] python pickle data types
- Subject: [ale] python pickle data types
- From: yahoo at jimpop.com (Jim Popovitch)
- Date: Thu Oct 25 01:39:34 2007
- In-reply-to: <[email protected]>
- References: <1193259020.8598.19.camel@localhost> <[email protected]>
On Thu, 2007-10-25 at 00:17 -0400, Matt Kubilus wrote:
> It's not that you are pickling a non-standard data type. You should
> be able to pickle pretty much any *python* object.
>
> It appears that python has no way of knowing what is inside
> private/protected parts of C/C++ extension classes. This kind of
> makes sense. It appears you may have to either add something to the C
> class or extend it in python. This is what a cursory glances shows:
>
> http://osdir.com/ml/programming.swig/2003-03/msg00061.html
>
> An alternate method may be to extract the data parts from the object
> and create a method that can load & save this data. I'm making the
> assumption that there is some kind of useful interface to these
> classes. I'm not really sure what you are doing, so I'm going out on
> a limb here.
Thanks Matt,
I wanted to avoid the class extension route, but it seems that is what
it is going to take. What I have is a 3rd party library that has
functions that use a struct of 2 doubles to pass data around. I'll try
writing a class definition and passing that around in my python code.
Thx,
-Jim P.