一个简单的、跨平台的、纯python模块,用于类似javascript的消息框。

PyMsgBox的Python项目详细描述


Pymsgbox

一个简单的、跨平台的、纯python模块,用于类似javascript的消息框。

要导入,请运行:

>>> from pymsgbox import *`

pymsgbox中有四个函数,它们遵循javascript的消息框命名约定:

>>> alert(text='', title='', button='OK')`

Displays a simple message box with text and a single OK button. Returns the text of the button clicked on.

>>> confirm(text='', title='', buttons=['OK', 'Cancel'])`

Displays a message box with OK and Cancel buttons. Number and text of buttons can be customized. Returns the text of the button clicked on.

>>> prompt(text='', title='' , defaultValue='')`

Displays a message box with text input, and OK & Cancel buttons. Returns the text entered, or None if Cancel was clicked.

>>> password(text='', title='', defaultValue='', mask='*')`

Displays a message box with text input, and OK & Cancel buttons. Typed characters appear as *. Returns the text entered, or None if Cancel was clicked.

在LinuxPython2上,首先需要通过运行:sudo apt get install python tk来安装Tkinter

修改的BSD许可证

源自斯蒂芬·雷蒙德·弗格的随和http://easygui.sourceforge.net/

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用DBFlow进行迁移?   java无法从socket读取数据   java在JButton上使用鼠标运动监听器?   元素的java ArrayList链接和get IndexOutOfBoundsException   javascript如何在Java脚本中从ajax调用解析JSON对象   从数据库中获取信息并将其写入JTable。错误:java。lang.IndexOutOfBoundsException:索引:2,大小:2   spring如何使用Java SpringBoot在FCM推送通知中向IOS发送图像通知   java jsoup:解析某个标记的数据,该标记恰好位于某个特定标记之后   java没有HashMap的等式依赖于EntrySet。钥匙套?   未按预期评估java Maven属性(osmavenplugin)   类Java向ArrayList添加了用户输入,需要用另一个ArrayList中的变量分隔   JavaJSF丰富:每行呈现的数据列表?   集合Java 8按属性区分   在Java中,是否可以(静态)导入构造函数或局部变量?   安卓在ubuntu 10上安装java时出错64位   java是否应该hashCode()只使用equals()中使用的不可变字段的子集?   java如何创建ConcurrentMultiMap