python3-图形化界面

easygui安装:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple easygui

导入easygui模块:

import easygui

msgbox方法:

import easygui
name = easygui.msgbox(msg='武汉加油',title='新型肺炎',ok_button='加油',image='/Users/admin/work/base_jobs/笨办法/练习/aaa.png',root=None)
#msg=内容
#title=标题
#ok_button=确认按钮
#image=需要插入的图片,自测是不支持http协议的

ccbox方法:选择对话框

import sys
import easygui as g
g.ccbox(msg='武汉加油',title='新型肺炎',choices=('加油','下次加油'))
#msg=内容
#title=标题
#choices提供选择项
原文地址:https://www.cnblogs.com/python-cat/p/12262626.html