Python 3.x 使用pyinstaller在exe中设置是或否问题?

Python 3.x 使用pyinstaller在exe中设置是或否问题?,python-3.x,exe,pyinstaller,Python 3.x,Exe,Pyinstaller,我目前正在使用pyinstaller制作exe,我想在里面插入Y/N问题 我目前正在使用: msvcrt.getch() 对于这个,但这只是一个点击任何东西继续键入文本 有什么帮助吗?你试过tkinter吗 import tkinter as tk from tkinter import messagebox # this is required to hide GUI window tk.Tk().withdraw() MsgBox = tk.messagebox.askquestio

我目前正在使用pyinstaller制作exe,我想在里面插入Y/N问题

我目前正在使用:

msvcrt.getch()
对于这个,但这只是一个点击任何东西继续键入文本


有什么帮助吗?

你试过tkinter吗

import tkinter as tk
from tkinter import messagebox

# this is required to hide GUI window
tk.Tk().withdraw()

MsgBox = tk.messagebox.askquestion('Info', 'Have you tried tkinter?', icon = 'warning')
if MsgBox == 'yes':
    ...
else
    ...