1 Star 2 Fork 0

shan.li / Vissim-Python-Qt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
yes_interface_yes_accelerate.py 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
shan.li 提交于 2021-07-24 19:06 . “message”
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/7/24 11:15
# @Author : LiShan
# @Email : lishan_1997@126.com
# @File : yes_interface_yes_accelerate.py
# @Note : this is note
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : main.py
# @Note : 主程序入口
import os
import sys
from PyQt5.QtCore import QCoreApplication, QTranslator, Qt
from PyQt5.QtWidgets import QApplication
from interface.window import MainWindow
# 检查文件路径
def check_path():
path_list = ['./model', './model/pkl', './model/png', './model/txt', './backup', './result', './other']
for path in path_list:
if os.path.exists(path):
pass
else:
os.mkdir(path)
# CPU电源模式配置(开启高性能模式)
def power_config(index=2):
import subprocess
mode = [
"a1841308-3541-4fab-bc81-f71556f20b4a", # 节能
"381b4222-f694-41f0-9685-ff5bb260df2e", # 平衡
"8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c", # 高性能
"e9a42b02-d5df-448d-aa00-03f14749eb61", # 卓越
]
subprocess.call("Powercfg -s %s" % mode[index])
if __name__ == '__main__':
power_config(2)
check_path()
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = QApplication(sys.argv)
trans = QTranslator()
trans.load("zh_CN")
app.installTranslator(trans)
window = MainWindow()
window.simulation = [999999, 0, 1, 1, 42, False, False]
window.show()
sys.exit(app.exec_())
Python
1
https://gitee.com/lishan666/vissim-python-qt.git
git@gitee.com:lishan666/vissim-python-qt.git
lishan666
vissim-python-qt
Vissim-Python-Qt
master

搜索帮助