pythonrpyc

How to start an rpyc server?


I recently installed rpyc on my Ubuntu 14.04 Virtual machine using:

pip install rpyc

i cannot find the file which can be used to start the server. I have looked in many places but to no avail.


Solution

  • It is simply rpyc_classic.py from the comand line:

    $ rpyc_classic.py 
    INFO:SLAVE/18812:server started on [0.0.0.0]:18812
    

    Then connect:

    from rpyc import classic
    
    c = classic.connect("0.0.0.0",port=18812)
    
    print(c.modules.sys.platform)
    linux
    

    You will see the connection in your shell:

    INFO:SLAVE/18812:accepted 127.0.0.1:58217
    INFO:SLAVE/18812:welcome [127.0.0.1]:58217
    

    The example is in the pypi documentation