Update nologs.py
Browse files
nologs.py
CHANGED
@@ -9,7 +9,7 @@ except FileNotFoundError:
|
|
9 |
|
10 |
with open("logs.txt", "w") as log_file:
|
11 |
# 执行您的Python程序,将标准输出和标准错误重定向到/dev/null
|
12 |
-
proc = subprocess.Popen(['python', '
|
13 |
|
14 |
# 循环读取标准输出并写入日志文件
|
15 |
for line in proc.stdout:
|
|
|
9 |
|
10 |
with open("logs.txt", "w") as log_file:
|
11 |
# 执行您的Python程序,将标准输出和标准错误重定向到/dev/null
|
12 |
+
proc = subprocess.Popen(['python', 'v2_3.py'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
13 |
|
14 |
# 循环读取标准输出并写入日志文件
|
15 |
for line in proc.stdout:
|