V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
angel725
V2EX  ›  Python

pyinstaller 打包 pyqt5 程序去掉了命令行黑框,却又多了一个。

  •  
  •   angel725 · 2018-10-05 20:01:34 +08:00 · 3275 次点击
    这是一个创建于 2001 天前的主题,其中的信息可能已经有所发展或是发生改变。
    pyqt5 做的 gui,点上面的按钮先要打开一个浏览器(用的是 webdriver 实现)
    能正常运行。
    用 pyinstaller XX.py 打包后,直接打开就有一个黑框

    然后我加了参数-w
    pyinstaller -w xx.py
    启动的黑框没了,但点按钮后,出来一个 geckodriver.exe 的命令行(黑框 ),

    怎么回事呢?能去掉吗?
    1 条回复    2018-10-06 03:46:57 +08:00
    ysc3839
        1
    ysc3839  
       2018-10-06 03:46:57 +08:00 via Android
    通过修改 CreateProcess 的参数能隐藏控制台窗口,但是如果是 Python 的话可能经过了层层封装,无法直接控制 CreateProcess 的参数。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5402 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:47 · PVG 14:47 · LAX 23:47 · JFK 02:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.