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
bitkwan
V2EX  ›  Python

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

  •  
  •   bitkwan ·
    bitkwan · 2016-08-12 08:05:02 +08:00 · 2115 次点击
    这是一个创建于 2816 天前的主题,其中的信息可能已经有所发展或是发生改变。

    直接运行.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 条回复    2016-08-12 08:38:28 +08:00
    imlonghao673
        1
    imlonghao673  
       2016-08-12 08:08:03 +08:00 via Android
    rogerchen
        2
    rogerchen  
       2016-08-12 08:09:00 +08:00
    bitkwan
        3
    bitkwan  
    OP
       2016-08-12 08:38:28 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1305 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:38 · PVG 01:38 · LAX 10:38 · JFK 13:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.