A simple, cross-platform, pure Python module for JavaScript-like message boxes.
Project description
A simple, cross-platform, pure Python module for JavaScript-like message boxes.
To import, run:
>>> from pymsgbox import *`
There are four functions in PyMsgBox, which follow JavaScript’s message box naming conventions:
>>> 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.
You can also use your platform’s native system calls for displaying a message box with the OS’s look-and-feel. (Currently this is only supported by alert() and confirm() on Windows.)
>>> import pymsgbox.native as pymsgbox
Modified BSD License
Derived from Stephen Raymond Ferg’s EasyGui http://easygui.sourceforge.net/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file PyMsgBox-1.0.2.zip
.
File metadata
- Download URL: PyMsgBox-1.0.2.zip
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af65339e45d364aa507e5f54461c3ed60e0aabd6c2a75f96613166e2e4b8af42 |
|
MD5 | 043a9123cc020e5ea3c1823ad9dfa232 |
|
BLAKE2b-256 | 62591f679c92872e4fc7ec12a41d61d7c9d9dbe0cdab8f2fa8726c939bc361fb |