V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
bitkwan
V2EX  ›  Python

直接运行 py 时正常,但是 py2exe 后提示 input()错误

  •  
  •   bitkwan ·
    bitkwan · Aug 12, 2016 · 2549 views
    This topic created in 3551 days ago, the information mentioned may be changed or developed.

    直接运行.py 时正常。 py2exe 打包成.exe 时提示 input()错误,错误提示:

    Traceback (most recent call last):
      File "updater.py", line 177, in <module>
      File "updater.py", line 102, in init
    RuntimeError: input(): lost sys.stdin
    
    

    177 行:

    init()
    

    102 行上下是:

    def init():
        max = input()
    
    3 replies    2016-08-12 08:38:28 +08:00
    rogerchen
        2
    rogerchen  
       Aug 12, 2016
    bitkwan
        3
    bitkwan  
    OP
       Aug 12, 2016
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2309 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 15:48 · PVG 23:48 · LAX 08:48 · JFK 11:48
    ♥ Do have faith in what you're doing.