logo       

Is this a bug or am I doing it wrong?: msg#00009

python.pyrex

Subject: Is this a bug or am I doing it wrong?

I'm building a module "matrix" to be included in a package "my" using Pyrex. This works fine allowing me to "import my.matrix". But while trying to implement the pickle protocol for the resulting object, I've run into the problem that __module__ returns "matrix" instead of "my.matrix". A python module inside a package will return "my.matrix" for its __module__ name. The pickle protocol wants to be able to find the class for later unpickling.

Is there a way to tell Pyrex that the module is going to reside inside a package?

Thanks
gb

(Pyrex is great stuff, I'm having a good time learning it.)


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise