User input in dialog box

后端 未结 3 1710
栀梦
栀梦 2021-02-20 08:16

Is there any library available in python for the graphical user entry input. I know about tk but I believe it takes some line of codes to do that. I am looking for

3条回答
  •  天涯浪人
    2021-02-20 08:24

    You have two choices for a solution. There are two packages you can pip to get, one is easygui, the other is easygui_qt. easygui is based on tcl, and easygui_qt is based on the qt Window manager and is a little more difficult to set up, but just as simple to use, with a few more options.

    All they require to use is to import the package, import easygui, and after that, to get a user response you would use one line...

    myvar = easygui.enterbox("What, is your favorite color?")
    

    Google "python easygui" for more detailed info.
    You can get easygui from pypi.

提交回复
热议问题