質問編集履歴
3
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,14 +76,12 @@
|
|
76
76
|
|
77
77
|
|
78
78
|
|
79
|
-
try:
|
79
|
+
result = subprocess.run(r'py C:\Users\a\Desktop\py3\self.py', shell=True, check=False,
|
80
80
|
|
81
|
-
|
81
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
82
82
|
|
83
|
-
|
83
|
+
for line in result.stdout.splitlines():
|
84
84
|
|
85
|
-
for line in result.stdout.splitlines():
|
86
|
-
|
87
|
-
|
85
|
+
print('>>> ' + line)
|
88
86
|
|
89
87
|
```
|
2
import subprocessが消えてたので再編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -68,7 +68,9 @@
|
|
68
68
|
|
69
69
|
###追記
|
70
70
|
|
71
|
+
```
|
72
|
+
|
71
|
-
|
73
|
+
import subprocess
|
72
74
|
|
73
75
|
import sys
|
74
76
|
|
1
コメントにて
test
CHANGED
File without changes
|
test
CHANGED
@@ -63,3 +63,25 @@
|
|
63
63
|
|
64
64
|
|
65
65
|
pycharm
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
###追記
|
70
|
+
|
71
|
+
```import subprocess
|
72
|
+
|
73
|
+
import sys
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
try:
|
78
|
+
|
79
|
+
result = subprocess.run(r'py C:\Users\a\Desktop\py3', shell=True, check=True,
|
80
|
+
|
81
|
+
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
82
|
+
|
83
|
+
for line in result.stdout.splitlines():
|
84
|
+
|
85
|
+
print('>>> ' + line)
|
86
|
+
|
87
|
+
```
|