windows弹窗库pymsgbox简单使用

import pymsgbox

pymsgbox.alert(text='', title='', button='OK')
pymsgbox.confirm(text='', title='', buttons=['OK', 'Cancel'])
pymsgbox.prompt(text='', title='' , default='')
pymsgbox.password(text='', title='', default='', mask='*')

# 弹窗确认框
pymsgbox.alert('This is an alert.', 'Alert!')

# 选择确认框
pymsgbox.confirm('你是否要查看以下内容?', '查看确认', ["确定", '取消'])

# 密码输入框,mask指定密码代替符号
res=pymsgbox.password('Enter your password.',mask='$')
print(res)

# 默认输入框
pymsgbox.prompt('What does the fox say?', default='This reference dates this example.')

# 选择确认框,设置时间后自动消失
pymsgbox.confirm('你是否要查看以下内容?', '查看确认', ["确定", '取消'], timeout=2000)

 

posted @ 2022-06-09 11:35  傻白甜++  阅读(455)  评论(0编辑  收藏  举报
TOP