I am trying to read an output from an interactive session and wait for the
next command. This is performed using RPyC connection.
Example:
from subprocess import Popen, PIPEfrom time import sleepimport sysimport rpyc
rp = rpyc.classic.connect("x.x.x.x", port=18812)
sp = rp.modules.subprocess.Popen("openssl",
stdin=rp.modules.subprocess.PIPE,
stdout=rp.modules.subprocess.PIPE,
stderr=rp.modules.subprocess.PIPE,
shell=True)print(sp)# Send Command #1
sp.stdin.write("speed rsa2048\n".encode())
sp.stdin.flush()
sleep(0.1)*data = sp.stdout.read() # Script hangs here
*print(data.decode())
--
---
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/d/optout.