[英]how do i make a setup.py file for cx_freeze?
I keep trying and nothing I do seems to work. 我一直在努力,但我似乎无济于事。 my code is 我的代码是
import sys
from cx_Freeze import setup, Executable
setup(
name = "Countdown",
version = "3.1",
description = "A simple countdown program.",
executables = [Executable("countdown.py", base = "Win32GUI")])
it will build the executable, but when i run it, i get an error when it comes to my input()
line and says lost sys.stdin
help? 它会生成可执行文件,但是当我运行它时,在我的input()
行上出现错误并说lost sys.stdin
帮助lost sys.stdin
吗?
The Win32GUI
base doesn't use a console, so it doesn't have any sys.stdin to read from. Win32GUI
基本不使用控制台,因此它没有要读取的sys.stdin。
If you're calling input()
, you probably want to use the Console
base for your application. 如果要调用input()
,则可能要为应用程序使用Console
基础。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.