代码拉取完成,页面将自动刷新
# coding:utf-8
import os
from flask import Flask ,redirect,render_template
from application import Application
appstart = Application()
app = Flask(__name__
# static_url_path="/static", # 访问静态资源的url前缀,默认值为static
# static_folder="static", # 静态文件的目录,默认是static
# template_folder="templates", # 模板文件的目录,默认是templates
) # 模块名,flask以这个模板所在的目录为总目录
# 配置参数的使用方式:
# 1.使用配置文件
# app.config.from_pyfile("config.cfg")
# 2.使用对象配置参数
# class Config(object):
# DEBUG = True
# app.config.from_object(Config)
# 3. 直接操作config的字典对象
# app.config["DEBUG"] = True
@app.route("/") # 带参装饰器 / 与下面视图函数绑定
def index():
"""定义的视图函数"""
return render_template("index.html")
@app.route("/NX7000") # 带参装饰器 / 与下面视图函数绑定
def NX7000():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\NX-7000\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
# return redirect('/')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/NX7008") # 带参装饰器 / 与下面视图函数绑定
def NX7008():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\NX-7008\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/NX7010") # 带参装饰器 / 与下面视图函数绑定
def NX7010():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\NX-7010\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/NX7015") # 带参装饰器 / 与下面视图函数绑定
def NX7015():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\NX-7015\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/NX7020") # 带参装饰器 / 与下面视图函数绑定
def NX7020():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\NX-7020\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/ECO7000") # 带参装饰器 / 与下面视图函数绑定
def ECO7000():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\ECO-7000\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/ECO8015") # 带参装饰器 / 与下面视图函数绑定
def ECO8015():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\ECO-8015\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/ECO8100") # 带参装饰器 / 与下面视图函数绑定
def ECO8100():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\ECO-8100\\writeProdID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/XG600") # 带参装饰器 / 与下面视图函数绑定
def XG600():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\XG-600\\X-G600_TXID.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/i608x") # 带参装饰器 / 与下面视图函数绑定
def i608x():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\pen\\I608X\\TabletTest.exe')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/i405x") # 带参装饰器 / 与下面视图函数绑定
def i405x():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\pen\\I405X\\TabletTest.exe')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/kyemouse") # 带参装饰器 / 与下面视图函数绑定
def kyemouse():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\mouse\\programs\\KYEMouse\\KYEMouse.exe /m')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/keyboard") # 带参装饰器 / 与下面视图函数绑定
def keyboard():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\Keyboard\\键盘TEST.EXE')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/cameratest") # 带参装饰器 / 与下面视图函数绑定
def cameratest():
"""定义的视图函数"""
# return "hello flask"
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\KyeTool\\camera\\camera.exe')
appstart.execAppByCmd(r'start C:\\Progra~2\\Audacity\\audacity.exe')
os.chdir(r'D:\\昆盈QC測試軟件\\KyeTool\\camera')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\KyeTool\\camera\\Alcor_Camera_Test.exe')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/AlcorQC") # 带参装饰器 / 与下面视图函数绑定
def AlcorQC():
"""定义的视图函数"""
os.chdir(r'D:\\昆盈QC測試軟件\\Alcor\\安國QC測試程式\\UFD_AlcorQC_v2.0.1.33-LOC_XP2K_Setup')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\Alcor\\安國QC測試程式\\UFD_AlcorQC_v2.0.1.33-LOC_XP2K_Setup\\AlcorQC.exe')
# appstart.execAppByCmd(r'start D:\\UFD_AlcorQC_v2.0.1.33-LOC_XP2K_Setup\\AlcorQC.exe')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/PrintPro") # 带参装饰器 / 与下面视图函数绑定
def PrintPro():
"""定义的视图函数"""
os.chdir(r'D:\\昆盈QC測試軟件\\Alcor\\安國掃碼程式\\PrintPro')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\Alcor\\安國掃碼程式\\PrintPro\\PrintPro.exe')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
@app.route("/usbclean") # 带参装饰器 / 与下面视图函数绑定
def usbclean():
"""定义的视图函数"""
os.chdir(r'D:\\昆盈QC測試軟件\\Alcor\\newUsbClean')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\Alcor\\newUsbClean\\drivecleanup1.40\\x64\\DriveCleanup.exe')
appstart.execAppByCmd(r'start D:\\昆盈QC測試軟件\\Alcor\\newUsbClean\\usboblivion-1.11.3.0\\usboblivion64.exe -enable -auto -nosave')
appstart.execAppByCmd(r'shutdown -f -r -t 000')
return redirect('https://meeting.geniusnet.com.cn/kyetest/index.html')
if __name__ == '__main__':
app.run()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。