успеха питон трубы, из стандартного ввода только один раз этот источникпитон трубы только STDIN, один раз, как это сделать в два раза или больше времени
main.py
import subprocess from subprocess import PIPE, STDOUT
player_pipe = subprocess.Popen(["source\call.py", 'arg1'], stdin=PIPE,
stdout=PIPE, stderr=STDOUT, shell=True)
player_pipe.stdin.write("Send Msg\n")
get_stdout = player_pipe.stdout.readline()
print("[Get Msg]" + get_stdout)
player_pipe.kill()
player_pipe.wait()
call.py
import sys
getMsg = raw_input()
print getMsg
, но я хочу в два раза или больше времени STDIN, из
так обновить источник, но он не работает
Что случилось это источник
main.py (обновление-не работает)
import subprocess from subprocess import PIPE, STDOUT
player_pipe = subprocess.Popen(["source\call.py", 'arg1'], stdin=PIPE,
stdout=PIPE, stderr=STDOUT, shell=True)
player_pipe.stdin.write("Send Msg\n")
get_stdout = player_pipe.stdout.readline()
print("[Get Msg]" + get_stdout)
player_pipe.stdin.write("Send Msg2\n")
get_stdout = player_pipe.stdout.readline()
print("[Get Msg]" + get_stdout)
player_pipe.kill()
player_pipe.wait()
call.py (обновление-не работает)
import sys
getMsg = raw_input()
print getMsg
getMsg2 = raw_input()
print getMsg2
: D
спасибо, хорошо работает, я не знаю, почему это в окне, возможно, с помощью git bash? –