Skip to main content

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.

On Linux Python 2, you need to first install Tkinter by running: sudo apt-get install python-tk

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 asterisks. Returns the text entered, or None if Cancel was clicked.

Modified BSD License

Derived from Stephen Raymond Ferg’s EasyGui http://easygui.sourceforge.net/

Project details


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.3.zip (21.5 kB view details)

Uploaded Source

File details

Details for the file PyMsgBox-1.0.3.zip.

File metadata

  • Download URL: PyMsgBox-1.0.3.zip
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyMsgBox-1.0.3.zip
Algorithm Hash digest
SHA256 b32c26663b0673942f900be39b0024af1df7106410e43368061342832e634afc
MD5 f4fa9fece7c1250cd7cb9cdc7cbabeb1
BLAKE2b-256 c8a45c1f13a8ab1f53986a4f9add1e4924be71ce22e79812f24cd09c2cb65686

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page