coding = utf - 8
‘这是一个图形化python界面的第一个例子,使用的是EasyGui’
‘author:me’
import easygui as g
import sys
while True:
g.msgbox(‘Hi,欢迎进入第一个界面小游戏!’)
msg = '请问你希望在鱼C工作室学习到什么知识呢?'
title = '小游戏互动'
choices = ['谈恋爱','编程','OOXX','琴棋书画']
choice = g.choicebox(msg,title,choices)
#not that we convert choice to string ,in case
#the user cancelled the choice,and we got None
g.msgbox('你的选择是:' + str(choice) , '结果')
msg = '你希望重新开始吗?'
title = '请选择'
if g.ccbox(msg,title):
pass
else:
sys.exit(0)
input()