winmsgbox
A simple wrapper of Windows' MessageBoxW function written in Python to display message boxes.
Features
- Display native Windows message boxes from Python
- Choose button sets, icons, default buttons, modality, and more
- Typed constants for easy configuration
Requirements
- Windows OS
- Python 3.x
Installation
Simply install using pip install winmsgbox
Usage
from winmsgbox import MessageBox, Buttons, Icon, DefaultButton, Modal, Flags, Response
result = MessageBox(
title="Hello",
text="This is a message box.",
buttons=Buttons.OkCancel,
icon=Icon.Information,
defaultButton=DefaultButton.First,
modal=Modal.ApplModal,
flags=Flags.SetForeground
)
if result == Response.Ok:
print("User clicked OK")
elif result == Response.Cancel:
print("User clicked Cancel")
API Reference
MessageBox
MessageBox(
title="",
text="",
buttons=Buttons.Ok,
icon=Icon.Empty,
defaultButton=DefaultButton.First,
modal=Modal.ApplModal,
flags=0x00000000,
window=0
) -> int
Displays a Windows message box with the specified parameters. Returns an integer corresponding to the button clicked.
Constants
Buttons: Ok, OkCancel, AbortRetryIgnore, YesNoCancel, YesNo, RetryCancel, CancelTryContinueIcon: Empty, Error, Question, Warning, InformationDefaultButton: First, Second, Third, FourthModal: ApplModal, SystemModal, TaskModalFlags: DefaultDesktopOnly, Right, RtlReading, SetForeground, TopMost, ServiceNotificationResponse: Ok, Cancel, Abort, Retry, Ignore, Yes, No, TryAgain, Continue
License
Metadata
Release files for winmsgbox 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| winmsgbox-1.0.1.tar.gz | 36.7 kB | Without provenance | Details for winmsgbox-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| winmsgbox-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for winmsgbox-1.0.1-py3-none-any.whl |
Total release size: 62.5 kB
Release files / winmsgbox-1.0.1.tar.gz
| Download URL | winmsgbox-1.0.1.tar.gz |
|---|---|
| Size | 36.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e17b9a4a0e6fccc71f7e1f2a3112cf2a30fc9d5b0256c679c4a7bddd665a33b9
|
|
BLAKE2b-256 checksum How to use checksums |
be776d7f8c69a8640d1bc9ae643fe975eb12112da34ec8fc27f374631920e2eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / winmsgbox-1.0.1-py3-none-any.whl
| Download URL | winmsgbox-1.0.1-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9af7704016104b443102e8285136c3f81d2444b7d35301c84aa843e68beae543
|
|
BLAKE2b-256 checksum How to use checksums |
15847ffa0b301e8a71480205996174ef23945c0fec7bbc1f299c521f52c17d14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for winmsgbox 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.