[Twisted-Python] issues using pb.Copyable

Oct. 27, 2006
4:33 a.m.
Hello, I am trying to use pb.Copyable to send some python objects back and forth between a client and server. I followed the documentation and quickly got some simple examples working. However i got stuck when i tried sending some python objects which are actually wrappers for stuff written in C. Here is an example of what i am trying to do Class C (Wrapper for a c data structure) Class B (inherits from class C and from pb.Copyable) I have a lot of wrapper functions which give me instances of Class C. Trying to do c_instance.__class__ = B does not work. I somehow need to cast those instances into instances of class B so that the jellying/unjellying can take place. What does one do in such a situation ? Regards, Deepankar
6713
Age (days ago)
6713
Last active (days ago)
1 comments
2 participants
participants (2)
-
Deepankar Sharma
-
Jean-Paul Calderone