跳转到主要内容

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

项目描述

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.

在Linux Python 2上,您需要先运行以下命令安装Tkinter:sudo apt-get install python-tk

修改版BSD许可协议

源自Stephen Raymond Ferg的EasyGui http://easygui.sourceforge.net/

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

PyMsgBox-1.0.9.tar.gz (18.8 kB 查看哈希)

上传时间 源代码

由以下机构支持