import cx_Freeze
import sys
base = None
if sys.platform == "win32":
base = "Win32GUI"
build_exe_options = {
"include_msvcr": True #skip error msvcr100.dll missing
}
executables = [cx_Freeze.Executable("Clock.pyw",base=base,icon="Icon.ico")]
cx_Freeze.setup(
name= "Clock client",
options = {"build_exe": build_exe_options ,{"packages":["tkinter"],"include_files":["Icon.ico"]}},
version = "0",
description = "Clock program",
executables = executables
)
第13行应该如何格式化,因为当我尝试编译此代码时,我得到错误无效语法,并且大括号突出显示我缺少什么?
答案 0 :(得分:1)
options = {"build_exe": build_exe_options ,{"packages":["tkinter"],"include_files":["Icon.ico"]}},
此代码错误,因为您不应该使用" build_exe_options,"位。
修正:
options = {"build_exe": {"packages":["tkinter"],"include_files":["Icon.ico"]}},