python的EasyGui模塊簡單用法介紹

#!/usr/bin/env python# -*- coding:utf-8 -*- #Author: ssimport easyguiimport syswhile 1:    easygui.msgbox('開始第一個小遊戲','開始遊戲')    msg = '請問你想看什麼類型的電影?'    title = '選擇興趣愛好'    choices = ['動做片','喜劇片','科幻片','愛情片','劇情片','其餘片']    choice = easygui.choicebox(msg,title,choices)    easygui.msgbox("你的選擇是:"+str(choice),'選擇結果')    msg = '你要從新開始遊戲嗎?'    title = '請選擇'    choices1 = ['從新開始','退出']    if easygui.ccbox(msg,title,choices1):        pass    else:        sys.exit(0)
相關文章
相關標籤/搜索