Skip to main content

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/

Support

If you find this project helpful and would like to support its development, consider donating to its creator on Patreon.

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-2.0.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymsgbox-2.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pymsgbox-2.0.0.tar.gz.

File metadata

  • Download URL: pymsgbox-2.0.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymsgbox-2.0.0.tar.gz
Algorithm Hash digest
SHA256 cc51b06d209bee5c3f608366a88b027030a56431dbaccf120cfc7040caa23277
MD5 356cf9339dee65c20a7fe2632344abe5
BLAKE2b-256 a06a54f11e8e0baf14fb2a702706bfcbbb0d305337903b12b96d48354fd4f794

See more details on using hashes here.

File details

Details for the file pymsgbox-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pymsgbox-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pymsgbox-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5633169aafdabdc758930ccaffb0e630f6a05322ee7d46f964a964b30eaa7a8d
MD5 697c05705403fac24dcb24f09a0d9084
BLAKE2b-256 2f12af433707b374072a0057b30f4df5a6c75e96507a98facfd6794a8c982e73

See more details on using hashes here.

Supported by

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