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

回答編集履歴

1

環境追記

2018/11/15 15:12

投稿

8524ba23
8524ba23

スコア38352

answer CHANGED
@@ -3,7 +3,7 @@
3
3
  その代わりに直接`stdout.write(`+バッファをフラッシュする必要があります。
4
4
  参考:[Pythonのsubprocessで標準出力をリアルタイムに取得する](https://qiita.com/megmogmog1965/items/5f95b35539ed6b3cfa17)
5
5
 
6
- メイン側
6
+ メイン側(main.py)
7
7
  ```Python
8
8
  import subprocess
9
9
  import datetime
@@ -47,4 +47,12 @@
47
47
  sys.stdout.write('x:{}\n'.format(i))
48
48
  sys.stdout.flush()
49
49
  time.sleep(1)
50
- ```
50
+ ```
51
+
52
+ #### 検証環境
53
+
54
+ Win10+Anaconda(Python3.5.x)+コマンドプロンプト上に加え
55
+ 以下の`WSL(Windows Subsystem for Linux)`のLinux環境でも正常動作することを確認。
56
+ OS:Ubuntu 14.04.5 LTS
57
+ Python:3.4.3
58
+ 実行手段:ターミナル(bash)上から`python3 main.py`にて実行。