say you want to forward stdin/stdout from the server to the client.

conn = rpyc.classic.connect(...)
conn.modules.sys.stdout = sys.stdout
conn.modules.sys.stdin = sys.stdin

this way, when the server writes something to stdout, it will be forwarded
to the client. you can also use redirected_std (a context manager) to do
the same. see
http://rpyc.sourceforge.net/api/utils_classic.html#rpyc.utils.classic.redirected_stdio

with redirected_std(conn):
    # rest of the code


-----------------------------------------------------------------

*Tomer Filiba*
tomerfiliba.com     <http://www.facebook.com/tomerfiliba>
<http://il.linkedin.com/in/tomerfiliba>



On Wed, Jun 13, 2012 at 9:01 PM, Marine <[email protected]> wrote:

> Hey all,
>
> I had a question regarding redirecting IO. I am trying to connect my
> client and server (both of which run a CLI application). How can i set up
> the pipes such that inputs and putputs of CLI from server side appear on
> the client side. I read in the documentation that you can use pipes to send
> and receive data (using create_pair()) but now I am a little confused,
> since I dont know how to push sys.stdout from the server into p1 and push
> the input from client side into p1. If anyone could explain how to do I
> would really appreciate the help
>
> thanks
>

Reply via email to