我想为我的程序制作一个图形用户界面形式的菜单,用户可以通过点击一个框来选择他们想要的,而不是输入数字/字母。到目前为止我得到的是:
while True:
encrypt = False
decrypt = False
viewz = False
errorz = False
inp = input("Do you want to [E]ncode, [D]ecode, [V]iew Code or [EX]it:")
inp = inp.lower()
if (inp != "e" and inp != "d" and inp != "encode" and inp != "decode" and inp != "v" and inp != "view code" ):
print("Input error")
print()
continue
if inp == "e" or inp == "encode":
encrypt = True
if inp == "d" or inp == "decode":
decrypt = True
下面是一个在windows上运行的Python3.3的tkinter示例。不完全确定你的目的是什么,但希望能有所帮助。在
相关问题 更多 >
编程相关推荐