That's because os.system doesn't go through sys.stdout. You should use subprocess.popen and pass it stdout/in/err as arguments.
-Tomer On 21 באוק 2011 19:50, "Aditya" <[email protected]> wrote: > Hi all, > > I am currently trying out rpyc for remote deployment and test scripts. > I have been able to get a client-server running and perform the > required operations. But I am unable to redirect output to the client > for system commands, for which I get a success (0) or failure (1) > only. > > I followed the steps in http://rpyc.wikidot.com/doc:how-tos, which > work for conn.execute("print 'Hello World'") but not for > conn.modules.os.system() commands. > > Am I missing something basic here? > > >>> conn = rpyc.classic.connect('localhost') > >>> conn.modules.sys.stdout = sys.stdout > >>> conn.modules.os.system("ipconfig") > 0 > ********This should return me the ipconfig details rather than just 0- > >success. > > Thanks, > Aditya > > >
