Update SW_run.py
Browse files
SW_run.py
CHANGED
|
@@ -25,7 +25,8 @@ sys.stderr = logging.getLogger().handlers[0].stream
|
|
| 25 |
try:
|
| 26 |
# 在try块中运行 /bushu/ui/launch.py,并将输出重定向到日志文件
|
| 27 |
with open(log_file, 'a') as log_file_handle:
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
# 保存包含"Running"的行到url.txt
|
| 31 |
with open('/bushu/url.txt', 'a') as url_file:
|
|
|
|
| 25 |
try:
|
| 26 |
# 在try块中运行 /bushu/ui/launch.py,并将输出重定向到日志文件
|
| 27 |
with open(log_file, 'a') as log_file_handle:
|
| 28 |
+
cmd = ['python', '/bushu/ui/launch.py', '--share', '-o', '/bushu/out_url.txt']
|
| 29 |
+
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
| 30 |
|
| 31 |
# 保存包含"Running"的行到url.txt
|
| 32 |
with open('/bushu/url.txt', 'a') as url_file:
|