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:
deleteIt()

# 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
~~~

Documentation
=============

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

https://github.com/fyhuang/choice/wiki

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

choice-0.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file choice-0.1.tar.gz.

File metadata

  • Download URL: choice-0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for choice-0.1.tar.gz
Algorithm Hash digest
SHA256 0d7dd85021e14626eef72f077b2c937e83d296adc0d7f2eede587e2cfaf71721
MD5 5ba5590d21452e21df9142ab7ab3c1f7
BLAKE2b-256 f63eccd75fb3109b3c441c04fa07bbb4afc39d1ecc5c6e35760aa6dd70a38dd9

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