python - Transfering object through Pyro -


I am using a pyro in a project, and it does not understand how to move a whole object on the wire Go. The object is delivered not (my distributed object works perfectly well), but should work as an argument for the already available distributed object.

My object is derived from a custom class that contains some methods and some variables - an integer and a list. Class server and client are available for both of the distributed objects when using my object as an argument, the integer variables are correctly "received", but the list is empty, even if I can see that in it The values ​​already included before "Send" are included.

Why is this?

Short version of the class:

  class collection (Pyro.core.ObjBase): num = 0 operations = [("Operation:", "Price": "Details "," Timestamp ")] def __init __ (self): Pyro.core.ObjBase .__ init __ (self) def joint (self, val, desc): entry = (" add ", val, ("% Y- Self.operations.append (insertion) self.num = self.num + 1f print (self): print "This collection will execute the following operations:"% m-% d% H:% M:% S ")) self.operations.append (entry) For items in self. Operation: print item  

The method of getting into the distributed object:

  def apply (self, archive): print "Todo: Apply collection" # Op = collection.getop () print "Number of collected operations:", collection.a archive .printop ()  

operations one Class characteristic is not an object attribute, this is the reason why it is not transferred via __init __ to self.operations = & lt; Whatever & gt; .


Comments