当前位置: 首页>>代码示例>>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;未经允许,请勿转载。