xhs/main.py

14 lines
475 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import subprocess
from visualization import main
if __name__ == '__main__':
# 创建一个startupinfo对象用于配置新进程
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE # 确保窗口被隐藏
# 执行命令,不捕获输出,不显示命令行窗口
subprocess.run(['npm', 'install', 'jsdom'], shell=True, startupinfo=startupinfo)
main()