推荐学习书目
› 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
Flash1
V2EX  ›  Python

win10 运行 pyw 文件后,怎么打开控制台窗口查看输出

  •  
  •   Flash1 · Apr 25, 2020 · 3159 views
    This topic created in 2352 days ago, the information mentioned may be changed or developed.

    想查看运行状态怎么办

    Supplement 1  ·  Apr 25, 2020
    有没有让 python 后台运行,同时又可以查看输出、运行状态的方法
    8 replies  •  2020-04-26 10:35:06 +08:00
    ClericPy
        1
    ClericPy  
       Apr 25, 2020
    别双击, 在命令行里 python xxx.pyw 就行了吧...
    imn1
        2
    imn1  
       Apr 25, 2020   ❤️ 1
    简单说,用 pythonw.exe 执行的,没有输出,用 python.exe 执行的有输出,跟扩展名是 py 还是 pyw 无关
    QingXuJiaZhi
        3
    QingXuJiaZhi  
       Apr 25, 2020   ❤️ 1
    ysc3839
        4
    ysc3839  
       Apr 25, 2020 via Android
    > 有没有让 python 后台运行,同时又可以查看输出、运行状态的方法
    启动后隐藏控制台。或者用 ConEmu,好像有隐藏到托盘的功能。
    qile1
        5
    qile1  
       Apr 25, 2020 via Android
    用重定向 >>log. txt
    后台运行,查看输出去文本文件里面看可以不?
    ipwx
        6
    ipwx  
       Apr 25, 2020
    有没有让 python 后台运行,同时又可以查看输出、运行状态的方法
    ----

    用 Logging 模块而不是 print
    luckyc
        7
    luckyc  
       Apr 26, 2020   ❤️ 1
    @qile1 这个重定向无法输出 logging 输出到终端上的内容,
    很是头疼.
    ClericPy
        8
    ClericPy  
       Apr 26, 2020   ❤️ 1
    ![Snipaste_2020-04-26_10-33-25.png]( https://i.loli.net/2020/04/26/lyedTbNh12FRK8D.png)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2374 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 14:58 · PVG 22:58 · LAX 07:58 · JFK 10:58
    ♥ Do have faith in what you're doing.