Skip to main content
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!

functions for reading command-line input with type checking and optional value checking

Project Description
This module defines several general-purpose functions:

- The functions `get_bool`, `get_int`, `get_float`, and `get_str` facilitate the
reading interactive input from the command line, with type checks and optional
value checks on the user input. (The Python Standard Library provides a rather
minimal capability for reading command-line input).

- The function `make_check` generates a function as its output; the generated
function tests a value against an arbitrary condition, and can be passed to any
of the above command-line input functions.

- The function `str2int` converts a string to an integer, with somewhat more
flexible rules for input formatting than those imposed by Python's `int`
function.
Release History

Release History

This version
History Node

1.0

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