Skip to main content

Easy request and response GUI for Python

Project description

Choice, a Python dialog library

choice is a quick little library for getting user input in Python in a dialog-like fashion. Here's a little example:

import choice

# Get a yes or no response (default is no)
confirm = choice.Binary('Are you sure you want to delete?', False).ask()
if confirm:

# Input an arbitrary value, check for correctness
howmany = choice.Input('How many pies?', int).ask()
print("You ordered {} pies".format(howmany))

# Choose from a set of options
entree = choice.Menu(['steak', 'potatoes', 'eggplant']).ask()

choice automatically displays the best UI available to the user: basic text console, curses, or GUI windows. (curses and GUI are in development!)

Requirements and Installation

For basic functionality, `choice` has no external dependencies, and requires only:

* Python 2.7 or 3

To install, just run:

pip install choice


API docs are coming soon. More in-depth documentation can be found on Github:

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for choice, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size choice-0.1.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page