0
我有兩個專門用於瀏覽和保存輸出的按鈕。它在控制檯中工作正常。但是,當我建立它的EXE,這兩個按鈕根本不打開瀏覽器,以瀏覽或保存。 這裏是cx_freeze代碼在由cx_Freeze構建的exe中,「asksaveasfile」和「askopenfile」不起作用。
import cx_Freeze
import sys
base = None
if sys.platform == 'win32':
base = "Win32GUI"
executables = [cx_Freeze.Executable("cypher.py", base=base,icon="icon2.ico")]
cx_Freeze.setup(
name = "Classical-Cypher",
options = {"build_exe": {"packages":["tkinter","PIL"], "include_files":["icon2.ico"]}},
version = "BETA",
description = "Encryption and decryption of classical cyphers",
executables = executables
)
建築顯示沒有錯誤! 圖形用戶界面是GUI
請幫助。