當前位置: 首頁>>代碼示例>>Python>>正文


Python easygui.msgbox方法代碼示例

本文整理匯總了Python中easygui.msgbox方法的典型用法代碼示例。如果您正苦於以下問題:Python easygui.msgbox方法的具體用法?Python easygui.msgbox怎麽用?Python easygui.msgbox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在easygui的用法示例。


在下文中一共展示了easygui.msgbox方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: connectStim

# 需要導入模塊: import easygui [as 別名]
# 或者: from easygui import msgbox [as 別名]
def connectStim():
    accepted=False
    choice=""

    while not accepted:
        thePorts=headset.getPorts()
        if len(thePorts) < 1:
            eg.msgbox(title="No devices connected",msg="No devices were detected. Make sure the BrainKit stimulator is connected and powered on and try again")
            portSelect="Cancel"
        else:
            print(str(thePorts))
            portSelect=eg.buttonbox(title="Stimulator port", msg="Select the port to which the stimulator is connected. If you do not know the port, connected or unplug the stimultor and click refresh", choices=[thePorts, "Refresh"])
        if portSelect and "Refresh" not in portSelect:
            accepted=True
            choice=portSelect
    if "Cancel" not in portSelect:
            try:
                print(str(choice))
                print("Attempting to connect to stimulator...")
                headset.getConnection(choice[0][0])
                return True
            except Exception:
                return False 
開發者ID:ohsnapitsnathan,項目名稱:brainkit,代碼行數:25,代碼來源:brainkit.py

示例2: errorPrompt

# 需要導入模塊: import easygui [as 別名]
# 或者: from easygui import msgbox [as 別名]
def errorPrompt(errorMsg):
    print 'Error: ' + errorMsg
    easygui.msgbox(msg = errorMsg, title = 'ERROR', ok_button = 'OK')
    quit() 
開發者ID:vzat,項目名稱:signature_extractor,代碼行數:6,代碼來源:masterForgery.py


注:本文中的easygui.msgbox方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。