《与小卡特一起学Python》Code4 GUI easygui的使用

EasyGui是基于TKinter的,所以可以跨平台使用。

使用方法很简单,下载之后解压把easygui.py放到python安装目录下的lib/site-packages/下面即可

import easygui 
easygui.msgbox("Hello, world!")
import easygui
flavor = easygui.buttonbox("what is your favorite ice cream flavor?",
                           choices = ['Vanilla','Chocolate','Strawberry'])
easygui.msgbox("You picked " + flavor)

两个简单的代码凑合着看吧

that's all!!!

原文地址:https://www.cnblogs.com/ccccnzb/p/5276855.html