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 @ 2019-12-30 14:56  Maple_feng  阅读(1928)  评论(0编辑  收藏  举报