pywinpop
Windows popup helpers built with ctypes.
Features
- info, warning, and alert message boxes
- yes/no, yes/no/cancel, ok/cancel, and retry/cancel confirmations
- single-line, password, and multiline text input dialogs
- open file, save file, Explorer-style folder dialogs, plus date and date-time pickers
- native color and font pickers
- error/details dialog and a lightweight progress dialog object
- value/result types for dialog results, colors, and fonts
Install
pip install pywinpop
For local development in this repository:
uv sync
Public API
The package exports these public symbols from pywinpop directly.
Message boxes and confirmation dialogs
show_info(message, title="Information") -> DialogResultshow_warning(message, title="Warning") -> DialogResultshow_alert(message, title="Alert") -> DialogResultask_yes_no(message, title="Question") -> boolask_ok_cancel(message, title="Confirm") -> boolask_yes_no_cancel(message, title="Question") -> DialogResultask_retry_cancel(message, title="Retry") -> DialogResult
File, folder, and value pickers
browse_for_file(...) -> Path | Nonesave_file(...) -> Path | Nonebrowse_for_folder(title="Select a folder") -> Path | Nonepick_date(...) -> date | Nonepick_datetime(...) -> datetime | Nonepick_color(initial_rgb=0x000000) -> ChosenColor | Nonepick_font(...) -> ChosenFont | None
Custom dialogs
input_box(...) -> str | Noneinput_password(...) -> str | Noneinput_multiline(...) -> str | Noneshow_error_details(message, *, details, title="Error Details") -> DialogResultProgressDialog(...)
Exported types
DialogResultChosenColorChosenFontProgressDialog
Example
from pywinpop import ProgressDialog
from pywinpop import ask_ok_cancel
from pywinpop import ask_yes_no
from pywinpop import browse_for_file
from pywinpop import browse_for_folder
from pywinpop import input_box
from pywinpop import input_multiline
from pywinpop import input_password
from pywinpop import pick_color
from pywinpop import pick_date
from pywinpop import pick_datetime
from pywinpop import pick_font
from pywinpop import show_alert
from pywinpop import show_error_details
from pywinpop import show_info
from pywinpop import show_warning
show_info("Backup completed.")
show_warning("This action cannot be undone.")
show_alert("A fatal error occurred.")
if ask_yes_no("Do you want to continue?"):
name = input_box("Enter your name:", default="Richard")
password = input_password("Enter your password:")
notes = input_multiline("Enter notes:", default="Line 1")
chosen_file = browse_for_file(title="Select a document")
chosen_folder = browse_for_folder(title="Select an output folder")
chosen_date = pick_date(title="Select a due date")
chosen_datetime = pick_datetime(title="Select a reminder")
chosen_color = pick_color(initial_rgb=0x336699)
chosen_font = pick_font(initial_face_name="Segoe UI", initial_point_size=10.0)
if ask_ok_cancel("Show a details dialog?"):
show_error_details(
"The backup failed.",
details="Raw Win32 or traceback details can go here.",
)
with ProgressDialog(title="Example Progress", message="Working") as dialog:
dialog.set_progress(1, total=3)
print(
name,
password,
notes,
chosen_file,
chosen_folder,
chosen_date,
chosen_datetime,
chosen_color,
chosen_font,
)
See example.py in the repository for a fuller interactive walkthrough.
Notes
- This package is Windows-only.
- The dialogs use Win32 APIs through ctypes rather than external GUI frameworks.
ProgressDialogis modeless; callset_message,set_progress, orpumpduring long-running work so it stays responsive.- The folder picker uses the standard file-open dialog with Win32 control manipulation to present an Explorer-style folder selection flow.
Metadata
Release files for pywinpop 2026.5.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pywinpop-2026.5.5.0.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pywinpop-2026.5.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / pywinpop-2026.5.5.0.tar.gz
| Download URL | pywinpop-2026.5.5.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a769e2e1d260a75710f4127aa7e2e07673f99ac09e17bd80a1793248b6052d1c
|
|
BLAKE2b-256 checksum How to use checksums |
568869ff865dce6a3807275483fd3aaec0143289ab6cbcc0dd86c9dddebffc41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pywinpop-2026.5.5.0-py3-none-any.whl
| Download URL | pywinpop-2026.5.5.0-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bab8fd00f9537d84fe90dc6eda4db43110d4d1167a8799201ecd6602861cb67d
|
|
BLAKE2b-256 checksum How to use checksums |
d4e74ff59c0aa26fd9be785695cf5d0e3f9cf2a4c807496efb0a11c8b49bc4d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|