Skip to main content

Python library for terminal-based dialogs

Project description

pydialogs

Python Library for making Dialogs

Requirements

  • Python 3.x
  • curses and textwrap libraries

Functions

1. alert(title, message, width=50, height=10, button="OK")

Displays a simple alert box in the console.

Parameters:

  • title (str): The title of the box.
  • message (str): The message to display in the box.
  • width (int, optional): The width of the box. Default is 50.
  • height (int, optional): The height of the box. Default is 10.
  • button (str, optional): The label of the button. Default is "OK".

Example Usage:

alert("Welcome", "Welcome to my script, press OK to continue.")

2. select(title, message, width=50, height=10, options=None) (returns str)

Displays a box in the console where the user can use the arrow keys to navigate through choices the user can select.

Parameters:

  • title (str): The title of the selection box.
  • message (str): The message to display in the box.
  • width (int, optional): The width of the box. Default is 50.
  • height (int, optional): The height of the box. Default is 10.
  • options (list, optional): A list of options to choose from. Default is ["Yes", "No"].

Example Usage:

selection = select("IMPORTANT", "All data will be erased on drive Z:\, do you want to continue?", options=["Yes", "No"])
alert(f"You selected: {selection}")

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydialogs-1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

pydialogs-1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pydialogs-1.0.tar.gz.

File metadata

  • Download URL: pydialogs-1.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pydialogs-1.0.tar.gz
Algorithm Hash digest
SHA256 1c2dca844d2bfa903c42f3a535babd76160abe80106012b1be28967b999f8dec
MD5 e3592876bb1f346737158c670d6aff34
BLAKE2b-256 a844612babc827f61f5914a9f42b619c282f593b2692b2c420ca26feab2dec6e

See more details on using hashes here.

File details

Details for the file pydialogs-1.0-py3-none-any.whl.

File metadata

  • Download URL: pydialogs-1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pydialogs-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f4f7d6ff5f2138b7228cf6c465cb9c124e006099ab53a235a43b15ea88fe9ac
MD5 0d2f2c89a478fb698084f9956ee49473
BLAKE2b-256 b921b595cbb386fd43423d4e091ad470d64372a8dd532c0017d1535f1209a4ba

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