This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple CUI input prompt

Project Description

Simple CUI prompt input for Python

Installing

Install the latest stable from PyPi:

pip install prompter

Install the latest development version from master:

pip install git+git://github.com/tylerdave/prompter

Using

>>> from prompter import prompt, yesno

>>> prompt('What is your name?')
What is your name? Dave
'Dave'

>>> prompt('What is your name?', default='Jenn')
What is your name? [Jenn]
'Jenn'

>>> prompt('What is your name?', default='Jenn', suffix='\n > ')
What is your name? [Jenn]
>
'Jenn'

>>> prompt('Enter text surrounded by spaces.', strip=False)
Enter text surrounded by spaces.    text
'   text   '

>>> yesno('Really?')
Really? [Y/n]
True

>>> yesno('Really?')
Really? [Y/n] no
False

>>> yesno('Really?', default='no')
Really? [y/N]
True

>>> yesno('')
[Y/n] n
False

Note

Please open an issue on Github if you notice problems or have suggestions!

Release History

Release History

This version
History Node

0.3.10

History Node

0.3.9

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.2.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
prompter-0.3.10-py2.py3-none-any.whl (7.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 15, 2015
prompter-0.3.10.tar.gz (19.1 kB) Copy SHA256 Checksum SHA256 Source Nov 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting