在EasyGui中制作菜单的最佳实践是什么

时间:2020-05-05 18:57:13

标签: python-3.x

我目前在easygui中处理菜单的方式如下:

import easygui

choices = ["Choice 1", "Choice 2"]
while True;
    c = easygui.buttonbox(
        "Welcome to my dummy app!\nPlease choose an option below", "Test App", choices)

    if c == "Choice 1":
        function1()
    elif c == "Choice 2":
        function2()
    else:
        easygui.msgbox("Something went wrong!", "Test App")

有更好的方法吗?

0 个答案:

没有答案