I need to send informations to a bot launched by a client. I've tried to do something like
bot_process = subprocess.Popen(argv, \
stdin=subprocess.PIPE, \
stdout=subprocess.PIPE)
while True:
bot_stdout = bot_process.communicate(message.encode())[0]
print(bot_stdout)
But function communicate() stop the process after one call.
I need to send continually informations to my bot and listen his response. Do you have any solutions to run bot before loop and write in bot stdin + listen to bot stdout inside the loop
?
Thanks !