質問するログイン新規登録

回答編集履歴

1

sys.stdout.write に変更

2021/04/27 22:36

投稿

xail2222
xail2222

スコア1530

answer CHANGED
@@ -5,7 +5,10 @@
5
5
  標準出力の結果がprint(retcode)だけになるので
6
6
  その結果を受け取ればいいのではないでしょうか。
7
7
 
8
+ あとprint(retcode)では改行が付くので
9
+ sys.stdout.write(retcode)
8
- なので
10
+ に変更して
11
+
9
12
  加えてpopen.pyの方も
10
13
 
11
14
  proc = subprocess.Popen(cmd.split(),stdout=subprocess.PIPE)