学习主题:图形用户界面EasyGui
学习日期:2020-02-09
Python 版本:3.7.4
安装easygui模块
easygui这个模块在python中不自带。需要先安装
在cmd 中输入 ,即可采用pip 自动安装
认识EasyGui
#办法1
>>> import easygui
>>> dir(easygui)
['EgStore', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'abouteasygui', 'boolbox', 'boxes', 'buttonbox', 'ccbox', 'choicebox', 'codebox', 'diropenbox', 'eg_version', 'egdemo', 'egversion', 'enterbox', 'exceptionbox', 'fileopenbox', 'filesavebox', 'indexbox', 'integerbox', 'msgbox', 'multchoicebox', 'multenterbox', 'multpasswordbox', 'passwordbox', 'read_or_create_settings', 'textbox', 'ynbox']
>>> easygui.msgbox ('Hi ,PrettyGirl')
#办法2
>>> from easygui import *
>>> msgbox('Hi ,PrettyGirl')
#办法3 (强烈推荐使用)
>>>> import easygui as g
>>> g.msgbox('Hi ,PrettyGirl')
运行结果: