關於Easygui簡單說明教程(python的GUI類庫) 附安裝包


既然之前寫彈窗程序用到了Easygui, 就在這簡單說明一下.

Easygui是一個Python用於簡單開發GUI的類庫, 很適合新手寫簡單的圖形界面

EasyGui是基於TKinter的,所以可以跨平台使用。使用方法很簡單,下載之后解壓把easygui.py放到python安裝目錄下的lib/site-packages/下面即可

下載鏈接:http://pan.baidu.com/share/link?shareid=1629272171&uk=3961254249 密碼cmcz

官方地址:http://easygui.sourceforge.net/

1.EasyGui msgbox

msgbox

消息窗口. 實現代碼:

import easygui 
easygui.msgbox("Hello, world!")

2.EasyGui enterbox

enterbox

輸入窗口。

import easygui 
flavor = easygui.enterbox("What is your favorite ice cream flavor?") 
easygui.msgbox ("You entered " + flavor)

3.Easygui buttonbox

buttonbox

選項窗口

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM