A simple, cross-platform, pure Python module for JavaScript-like message boxes.
Project description
PyMsgBox
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.
On Linux Python 2, you need to first install Tkinter by running: sudo apt-get install python-tk
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
PyMsgBox-1.0.9.tar.gz
(18.8 kB
view details)
File details
Details for the file PyMsgBox-1.0.9.tar.gz
.
File metadata
- Download URL: PyMsgBox-1.0.9.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2194227de8bff7a3d6da541848705a155dcbb2a06ee120d9f280a1d7f51263ff |
|
MD5 | 007677929ce311e52e442dadb31ca669 |
|
BLAKE2b-256 | 7dff4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875 |