Hi,

     I am quite new to using RPyC. For my test framework I am trying to 
create a generic local wrapper class which will actually return me netref 
class instance of remote machine. For this I am trying to override __new__ 
method of my wrapper class. What I am trying is as below (in code below I 
have hardcoded things, but eventually I want to generalize it using 
parameters)

import rpyc

class WrapperClass:
    def __new__(cls, *args, **kwargs):
         conn = rpyc.classic.connect('localhost')
         _new_instance = conn.modules[mypath.mymodule.MyClass'].MyClass()
         return _new_instance

But I use this wrapper class, I can create netref instace of MyClass, but 
if I call __dir__ on that to list attributes, it gives me error 
like ReferenceError: weakly-referenced object no longer exists

Can somebody please let me know what is going wrong.

Thanks,
Prashant


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to