说明
在本机运行,打包就真的没啥必要了,bat 运行
写个 bat 创建个快捷方式 就很是 OK
gui 程序不需要 cmd ,用 pythonw.exe
这玩意没啥可说的,直接上代码
xyj.bat
REM 当前目录是 "10 阅读西游记.py" 所在的目录
start pythonw "10 阅读西游记.py"
REM 当前目录 NOT 是 "10 阅读西游记.py" 所在的目录
REM D:
REM cd d:/Users/Administrator/Desktop/pyprojects/PyQt
REM start pythonw.exe d:/Users/Administrator/Desktop/pyprojects/PyQt/"10 阅读西游记.py"
REM cmd python.exe d:/Users/Administrator/Desktop/pyprojects/PyQt/"10 阅读西游记.py"
REM 下面的代码没看懂,反正能运行,是我 copy 过来的,也是无控制台运行, 和服务类似
REM @echo off
REM if "%1" == "h" goto begin
REM mshta vbscript:createobject("wscript.shell").run("""%~0"" h",0)(window.close)&&exit
REM :begin
REM D:
REM cd d:/Users/Administrator/Desktop/pyprojects/PyQt
REM C:/Python/Python312/python.exe "d:/Users/Administrator/Desktop/pyprojects/PyQt/10 阅读西游记.py"