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.1.tar.gz (20.8 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.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymsgbox-2.0.1.tar.gz
  • Upload date:
  • Size: 20.8 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.1.tar.gz
Algorithm Hash digest
SHA256 98d055c49a511dcc10fa08c3043e7102d468f5e4b3a83c6d3c61df722c7d798d
MD5 ba437513437c934317a50e548f4a6647
BLAKE2b-256 ae6ae80da7594ee598a776972d09e2813df2b06b3bc29218f440631dfa7c78a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymsgbox-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5de8ec19bca2ca7e6c09d39c817c83f17c75cee80275235f43a9931db699f73b
MD5 cc91bde417ce827182c289c0129e3784
BLAKE2b-256 6f3e08c8cac81b2b2f7502746e6b9c8e5b0ec6432cd882c605560fc409aaf087

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