質問編集履歴
2
誤字
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Python subprocess.
|
1
|
+
Python subprocess.runでstderrにエラーが格納されない
|
test
CHANGED
File without changes
|
1
脱字
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Windows10で、Python3から以下のようにコマンドを実行します。
|
2
2
|
```python
|
3
|
-
res = run(["cmd", "/c", "copy", r"C:\test\abc.txt", r"C:\test2"], encoding="cp932", capture_output=True)
|
3
|
+
res = subprocess.run(["cmd", "/c", "copy", r"C:\test\abc.txt", r"C:\test2"], encoding="cp932", capture_output=True)
|
4
4
|
|
5
5
|
print(res)
|
6
6
|
print("正常:", res.stdout)
|